From d8a0417627bff83ddd83a6609d077a8a4f8cf23c Mon Sep 17 00:00:00 2001 From: Rabab Date: Mon, 17 Jun 2024 14:52:23 -0700 Subject: [PATCH 01/45] autorest generated changes including removal of enable-xml --- .../blob/implementation/AppendBlobsImpl.java | 4150 +++-- .../implementation/AzureBlobStorageImpl.java | 87 +- .../blob/implementation/BlobsImpl.java | 13949 ++++++++-------- .../blob/implementation/BlockBlobsImpl.java | 7047 ++++---- .../blob/implementation/ContainersImpl.java | 7742 +++++---- .../blob/implementation/PageBlobsImpl.java | 8174 +++++---- .../blob/implementation/ServicesImpl.java | 3236 ++-- .../AppendBlobsAppendBlockFromUrlHeaders.java | 85 +- .../models/AppendBlobsAppendBlockHeaders.java | 90 +- .../models/AppendBlobsCreateHeaders.java | 76 +- .../models/AppendBlobsSealHeaders.java | 48 +- .../models/ArrowConfiguration.java | 119 +- .../implementation/models/ArrowField.java | 107 +- .../models/BlobContainersSegment.java | 159 +- .../implementation/models/BlobDeleteType.java | 19 +- .../models/BlobExpiryOptions.java | 31 +- .../models/BlobFlatListSegment.java | 86 +- .../models/BlobHierarchyListSegment.java | 101 +- .../models/BlobItemInternal.java | 188 +- .../models/BlobItemPropertiesInternal.java | 424 +- .../blob/implementation/models/BlobName.java | 80 +- .../models/BlobPrefixInternal.java | 83 +- .../models/BlobSignedIdentifierWrapper.java | 86 + .../blob/implementation/models/BlobTag.java | 91 +- .../blob/implementation/models/BlobTags.java | 119 +- .../models/BlobsAbortCopyFromURLHeaders.java | 33 +- .../models/BlobsAcquireLeaseHeaders.java | 48 +- .../models/BlobsBreakLeaseHeaders.java | 48 +- .../models/BlobsChangeLeaseHeaders.java | 48 +- .../models/BlobsCopyFromURLHeaders.java | 75 +- .../models/BlobsCreateSnapshotHeaders.java | 62 +- .../models/BlobsDeleteHeaders.java | 33 +- .../BlobsDeleteImmutabilityPolicyHeaders.java | 33 +- .../models/BlobsDownloadHeaders.java | 262 +- .../models/BlobsGetAccountInfoHeaders.java | 75 +- .../models/BlobsGetPropertiesHeaders.java | 303 +- .../models/BlobsGetTagsHeaders.java | 33 +- .../models/BlobsQueryHeaders.java | 199 +- .../models/BlobsReleaseLeaseHeaders.java | 43 +- .../models/BlobsRenewLeaseHeaders.java | 48 +- .../models/BlobsSetExpiryHeaders.java | 43 +- .../models/BlobsSetHttpHeadersHeaders.java | 52 +- .../BlobsSetImmutabilityPolicyHeaders.java | 59 +- .../models/BlobsSetLegalHoldHeaders.java | 38 +- .../models/BlobsSetMetadataHeaders.java | 71 +- .../models/BlobsSetTagsHeaders.java | 33 +- .../models/BlobsSetTierHeaders.java | 28 +- .../models/BlobsStartCopyFromURLHeaders.java | 58 +- .../models/BlobsUndeleteHeaders.java | 33 +- .../BlockBlobsCommitBlockListHeaders.java | 81 +- .../models/BlockBlobsGetBlockListHeaders.java | 57 +- .../BlockBlobsPutBlobFromUrlHeaders.java | 76 +- .../BlockBlobsStageBlockFromURLHeaders.java | 66 +- .../models/BlockBlobsStageBlockHeaders.java | 66 +- .../models/BlockBlobsUploadHeaders.java | 76 +- .../models/ContainersAcquireLeaseHeaders.java | 48 +- .../models/ContainersBreakLeaseHeaders.java | 48 +- .../models/ContainersChangeLeaseHeaders.java | 48 +- .../models/ContainersCreateHeaders.java | 43 +- .../models/ContainersDeleteHeaders.java | 33 +- .../models/ContainersFilterBlobsHeaders.java | 33 +- .../ContainersGetAccessPolicyHeaders.java | 48 +- .../ContainersGetAccountInfoHeaders.java | 75 +- .../ContainersGetPropertiesHeaders.java | 122 +- .../ContainersListBlobFlatSegmentHeaders.java | 38 +- ...ainersListBlobHierarchySegmentHeaders.java | 38 +- .../models/ContainersReleaseLeaseHeaders.java | 43 +- .../models/ContainersRenameHeaders.java | 33 +- .../models/ContainersRenewLeaseHeaders.java | 48 +- .../models/ContainersRestoreHeaders.java | 33 +- .../ContainersSetAccessPolicyHeaders.java | 43 +- .../models/ContainersSetMetadataHeaders.java | 43 +- .../models/ContainersSubmitBatchHeaders.java | 28 +- .../models/DelimitedTextConfiguration.java | 118 +- .../models/EncryptionScope.java | 23 +- .../implementation/models/FilterBlobItem.java | 117 +- .../models/FilterBlobSegment.java | 142 +- .../models/FilterBlobsIncludeItem.java | 27 +- .../models/JsonTextConfiguration.java | 82 +- .../models/ListBlobsFlatSegmentResponse.java | 132 +- .../ListBlobsHierarchySegmentResponse.java | 143 +- .../models/PageBlobsClearPagesHeaders.java | 80 +- .../PageBlobsCopyIncrementalHeaders.java | 53 +- .../models/PageBlobsCreateHeaders.java | 76 +- .../PageBlobsGetPageRangesDiffHeaders.java | 52 +- .../models/PageBlobsGetPageRangesHeaders.java | 52 +- .../models/PageBlobsResizeHeaders.java | 52 +- .../PageBlobsUpdateSequenceNumberHeaders.java | 52 +- .../PageBlobsUploadPagesFromURLHeaders.java | 80 +- .../models/PageBlobsUploadPagesHeaders.java | 85 +- .../models/PremiumPageBlobAccessTier.java | 59 +- .../implementation/models/QueryFormat.java | 121 +- .../models/QueryFormatType.java | 35 +- .../implementation/models/QueryRequest.java | 109 +- .../models/QuerySerialization.java | 83 +- .../models/ServicesFilterBlobsHeaders.java | 33 +- .../models/ServicesGetAccountInfoHeaders.java | 48 +- .../models/ServicesGetPropertiesHeaders.java | 28 +- .../models/ServicesGetStatisticsHeaders.java | 33 +- .../ServicesGetUserDelegationKeyHeaders.java | 33 +- ...vicesListBlobContainersSegmentHeaders.java | 28 +- ...sListBlobContainersSegmentNextHeaders.java | 28 +- .../models/ServicesSetPropertiesHeaders.java | 28 +- .../models/ServicesSubmitBatchHeaders.java | 28 +- .../implementation/models/StorageError.java | 105 +- .../models/StorageErrorException.java | 12 +- .../implementation/models/package-info.java | 5 +- .../blob/implementation/package-info.java | 5 +- .../azure/storage/blob/models/AccessTier.java | 79 +- .../storage/blob/models/AccountKind.java | 39 +- .../storage/blob/models/ArchiveStatus.java | 27 +- .../storage/blob/models/BlobAccessPolicy.java | 104 +- .../blob/models/BlobAnalyticsLogging.java | 121 +- .../models/BlobContainerEncryptionScope.java | 32 +- .../blob/models/BlobContainerItem.java | 129 +- .../models/BlobContainerItemProperties.java | 205 +- .../blob/models/BlobCopySourceTagsMode.java | 23 +- .../storage/blob/models/BlobCorsRule.java | 119 +- .../storage/blob/models/BlobErrorCode.java | 558 +- .../storage/blob/models/BlobHttpHeaders.java | 62 +- .../models/BlobImmutabilityPolicyMode.java | 31 +- .../storage/blob/models/BlobMetrics.java | 109 +- .../blob/models/BlobRetentionPolicy.java | 97 +- .../blob/models/BlobServiceProperties.java | 170 +- .../blob/models/BlobServiceStatistics.java | 84 +- .../blob/models/BlobSignedIdentifier.java | 93 +- .../azure/storage/blob/models/BlobType.java | 31 +- .../com/azure/storage/blob/models/Block.java | 100 +- .../azure/storage/blob/models/BlockList.java | 159 +- .../storage/blob/models/BlockListType.java | 31 +- .../storage/blob/models/BlockLookupList.java | 109 +- .../azure/storage/blob/models/ClearRange.java | 91 +- .../storage/blob/models/CopyStatusType.java | 35 +- .../azure/storage/blob/models/CpkInfo.java | 38 +- .../models/DeleteSnapshotsOptionType.java | 27 +- .../blob/models/EncryptionAlgorithmType.java | 23 +- .../storage/blob/models/GeoReplication.java | 95 +- .../blob/models/GeoReplicationStatus.java | 27 +- .../azure/storage/blob/models/KeyInfo.java | 91 +- .../blob/models/LeaseDurationType.java | 27 +- .../storage/blob/models/LeaseStateType.java | 39 +- .../storage/blob/models/LeaseStatusType.java | 27 +- .../models/ListBlobContainersIncludeType.java | 31 +- .../blob/models/ListBlobsIncludeItem.java | 59 +- .../azure/storage/blob/models/PageList.java | 120 +- .../azure/storage/blob/models/PageRange.java | 91 +- .../storage/blob/models/PublicAccessType.java | 23 +- .../blob/models/RehydratePriority.java | 19 +- .../blob/models/SequenceNumberActionType.java | 31 +- .../azure/storage/blob/models/SkuName.java | 39 +- .../storage/blob/models/StaticWebsite.java | 107 +- .../blob/models/UserDelegationKey.java | 136 +- .../storage/blob/models/package-info.java | 5 +- .../azure-storage-blob/swagger/README.md | 6 +- .../main/java/BlobStorageCustomization.java | 149 +- 155 files changed, 29690 insertions(+), 25747 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 9ad746acb4480..64f5114db877c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -40,22 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AppendBlobs. */ +/** + * An instance of this class provides access to all the operations defined in AppendBlobs. + */ public final class AppendBlobsImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AppendBlobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureBlobStorageImpl client; /** * Initializes an instance of AppendBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ AppendBlobsImpl(AzureBlobStorageImpl client) { - this.service = - RestProxy.create(AppendBlobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(AppendBlobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -67,337 +73,449 @@ public final class AppendBlobsImpl { @ServiceInterface(name = "AzureBlobStorageAppe") public interface AppendBlobsService { @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> create(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> createNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase createSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response createNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> create( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + Mono> appendBlock(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> createNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + Mono> appendBlockNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> appendBlock( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, - @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> appendBlock(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> appendBlockNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, - @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> appendBlockNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> appendBlock( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, - @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase appendBlockSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> appendBlockNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, - @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Response appendBlockNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-blob-condition-maxsize") Long maxSize, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> appendBlockFromUrl( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @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("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, - Context context); + Mono> appendBlockFromUrl(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> appendBlockFromUrlNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @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("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, - Context context); + Mono> appendBlockFromUrlNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> seal( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase appendBlockFromUrlSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> sealNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, - @HeaderParam("Accept") String accept, - Context context); + Response appendBlockFromUrlNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> seal(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> sealNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase sealSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response sealNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-blob-condition-appendpos") Long appendPosition, @HeaderParam("Accept") String accept, + Context context); } /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -411,26 +529,12 @@ Mono> sealNoCustomHeaders( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> createWithResponseAsync(String containerName, String blob, + long contentLength, Integer timeout, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "AppendBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -484,73 +588,45 @@ public Mono> createWithResponseAsyn } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.create( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.create(this.client.getUrl(), containerName, blob, blobType, + timeout, contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, + metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context)); } /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -565,27 +641,12 @@ public Mono> createWithResponseAsyn * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> createWithResponseAsync(String containerName, String blob, + long contentLength, Integer timeout, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "AppendBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -639,71 +700,44 @@ public Mono> createWithResponseAsyn } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.create( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.create(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, contentType, + contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); } /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -717,74 +751,42 @@ public Mono> createWithResponseAsyn * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return createWithResponseAsync( - containerName, - blob, - contentLength, - timeout, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono createAsync(String containerName, String blob, long contentLength, Integer timeout, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return createWithResponseAsync(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); } /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -799,76 +801,42 @@ public Mono createAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return createWithResponseAsync( - containerName, - blob, - contentLength, - timeout, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono createAsync(String containerName, String blob, long contentLength, Integer timeout, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return createWithResponseAsync(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context) + .flatMap(ignored -> Mono.empty()); } /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -882,26 +850,12 @@ public Mono createAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> createNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Integer timeout, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "AppendBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -955,73 +909,45 @@ public Mono> createNoCustomHeadersWithResponseAsync( } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.createNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.createNoCustomHeaders(this.client.getUrl(), containerName, blob, + blobType, timeout, contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, + cacheControl, metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context)); } /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1036,27 +962,283 @@ public Mono> createNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> createNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Integer timeout, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "AppendBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.createNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout, + contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, + leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createWithResponse(String containerName, String blob, + long contentLength, Integer timeout, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "AppendBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, + contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(String containerName, String blob, long contentLength, Integer timeout, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + createWithResponse(containerName, blob, contentLength, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, Context.NONE); + } + + /** + * The Create Append Blob operation creates a new append blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "AppendBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1110,78 +1292,52 @@ public Mono> createNoCustomHeadersWithResponseAsync( } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, + leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1190,25 +1346,11 @@ public Mono> createNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> appendBlockWithResponseAsync(String containerName, + String blob, long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1233,72 +1375,49 @@ public Mono> appendBlockWithRe String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.appendBlock( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.appendBlock(this.client.getUrl(), containerName, blob, comp, + timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, + maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -1308,26 +1427,11 @@ public Mono> appendBlockWithRe * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> appendBlockWithResponseAsync(String containerName, + String blob, long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1352,70 +1456,49 @@ public Mono> appendBlockWithRe String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlock( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.appendBlock(this.client.getUrl(), containerName, blob, comp, timeout, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, + context); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1424,79 +1507,47 @@ public Mono> appendBlockWithRe * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return appendBlockWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - transactionalContentCrc64, - leaseId, - maxSize, - appendPosition, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono appendBlockAsync(String containerName, String blob, long contentLength, Flux body, + Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -1506,81 +1557,48 @@ public Mono appendBlockAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return appendBlockWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - transactionalContentCrc64, - leaseId, - maxSize, - appendPosition, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono appendBlockAsync(String containerName, String blob, long contentLength, Flux body, + Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + Context context) { + return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1589,25 +1607,11 @@ public Mono appendBlockAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> appendBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1632,72 +1636,49 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.appendBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, + leaseId, maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -1707,26 +1688,11 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> appendBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1751,70 +1717,49 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, + appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1823,25 +1768,11 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> appendBlockWithResponseAsync(String containerName, + String blob, long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1866,72 +1797,49 @@ public Mono> appendBlockWithRe String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.appendBlock( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.appendBlock(this.client.getUrl(), containerName, blob, comp, + timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, + maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -1941,26 +1849,11 @@ public Mono> appendBlockWithRe * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> appendBlockWithResponseAsync(String containerName, + String blob, long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -1985,70 +1878,49 @@ public Mono> appendBlockWithRe String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlock( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.appendBlock(this.client.getUrl(), containerName, blob, comp, timeout, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, + context); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2057,79 +1929,47 @@ public Mono> appendBlockWithRe * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return appendBlockWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - transactionalContentCrc64, - leaseId, - maxSize, - appendPosition, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono appendBlockAsync(String containerName, String blob, long contentLength, BinaryData body, + Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2139,81 +1979,48 @@ public Mono appendBlockAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return appendBlockWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - transactionalContentCrc64, - leaseId, - maxSize, - appendPosition, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono appendBlockAsync(String containerName, String blob, long contentLength, BinaryData body, + Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + Context context) { + return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2222,25 +2029,11 @@ public Mono appendBlockAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> appendBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -2265,72 +2058,49 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.appendBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, timeout, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, + leaseId, maxSize, appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2340,26 +2110,11 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> appendBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -2384,115 +2139,63 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - leaseId, - maxSize, - appendPosition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.appendBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, + appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); } /** - * The Append Block operation commits a new block of data to the end of an existing append blob where the contents - * are read from a source url. The Append Block operation is permitted only if the blob was created with - * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * * @param containerName The container name. * @param blob The blob name. - * @param sourceUrl Specify a URL to the copy source. * @param contentLength The length of the request. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockFromUrlWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - long contentLength, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - byte[] transactionalContentMD5, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public ResponseBase appendBlockWithResponse(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -2515,97 +2218,292 @@ public Mono> appendBloc encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.appendBlockFromUrl( - this.client.getUrl(), - containerName, - blob, - comp, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - contentLength, - transactionalContentMD5Converted, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - maxSize, - appendPosition, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context)); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.appendBlockSync(this.client.getUrl(), containerName, blob, comp, timeout, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, + context); } /** - * The Append Block operation commits a new block of data to the end of an existing append blob where the contents - * are read from a source url. The Append Block operation is permitted only if the blob was created with - * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * * @param containerName The container name. * @param blob The blob name. - * @param sourceUrl Specify a URL to the copy source. * @param contentLength The length of the request. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void appendBlock(String containerName, String blob, long contentLength, BinaryData body, Integer timeout, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + appendBlockWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.NONE); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block + * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is + * supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response appendBlockNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + BinaryData body, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "appendblock"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.appendBlockNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, + appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> appendBlockFromUrlWithResponseAsync( + String containerName, String blob, String sourceUrl, long contentLength, String sourceRange, + byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, + String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + final String comp = "appendblock"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return FluxUtil.withContext(context -> service.appendBlockFromUrl(this.client.getUrl(), containerName, blob, + comp, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, + contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, + context)); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2616,32 +2514,13 @@ public Mono> appendBloc */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> appendBlockFromUrlWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - long contentLength, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - byte[] transactionalContentMD5, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + String containerName, String blob, String sourceUrl, long contentLength, String sourceRange, + byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, + String leaseId, Long maxSize, Long appendPosition, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -2667,54 +2546,27 @@ public Mono> appendBloc String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrl( - this.client.getUrl(), - containerName, - blob, - comp, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - contentLength, - transactionalContentMD5Converted, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - maxSize, - appendPosition, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.appendBlockFromUrl(this.client.getUrl(), containerName, blob, comp, sourceUrl, sourceRange, + sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -2722,37 +2574,37 @@ public Mono> appendBloc * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2761,66 +2613,25 @@ public Mono> appendBloc * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockFromUrlAsync( - String containerName, - String blob, - String sourceUrl, - long contentLength, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - byte[] transactionalContentMD5, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return appendBlockFromUrlWithResponseAsync( - containerName, - blob, - sourceUrl, - contentLength, - sourceRange, - sourceContentMD5, - sourceContentcrc64, - timeout, - transactionalContentMD5, - leaseId, - maxSize, - appendPosition, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - requestId, - copySourceAuthorization, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono appendBlockFromUrlAsync(String containerName, String blob, String sourceUrl, long contentLength, + String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return appendBlockFromUrlWithResponseAsync(containerName, blob, sourceUrl, contentLength, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, + encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -2828,37 +2639,37 @@ public Mono appendBlockFromUrlAsync( * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2868,68 +2679,25 @@ public Mono appendBlockFromUrlAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono appendBlockFromUrlAsync( - String containerName, - String blob, - String sourceUrl, - long contentLength, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - byte[] transactionalContentMD5, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return appendBlockFromUrlWithResponseAsync( - containerName, - blob, - sourceUrl, - contentLength, - sourceRange, - sourceContentMD5, - sourceContentcrc64, - timeout, - transactionalContentMD5, - leaseId, - maxSize, - appendPosition, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - requestId, - copySourceAuthorization, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono appendBlockFromUrlAsync(String containerName, String blob, String sourceUrl, long contentLength, + String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return appendBlockFromUrlWithResponseAsync(containerName, blob, sourceUrl, contentLength, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, + encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -2937,37 +2705,37 @@ public Mono appendBlockFromUrlAsync( * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2976,32 +2744,13 @@ public Mono appendBlockFromUrlAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - long contentLength, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - byte[] transactionalContentMD5, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync(String containerName, String blob, + String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3027,56 +2776,28 @@ public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync( String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.appendBlockFromUrlNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - contentLength, - transactionalContentMD5Converted, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - maxSize, - appendPosition, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return FluxUtil.withContext(context -> service.appendBlockFromUrlNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, + timeout, contentLength, transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, + copySourceAuthorization, accept, context)); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -3084,37 +2805,37 @@ public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync( * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append - * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the - * value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code - * 412 - Precondition Failed). + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3124,33 +2845,13 @@ public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - long contentLength, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - byte[] transactionalContentMD5, - String leaseId, - Long maxSize, - Long appendPosition, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync(String containerName, String blob, + String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "appendblock"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3176,136 +2877,350 @@ public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync( String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrlNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - contentLength, - transactionalContentMD5Converted, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - maxSize, - appendPosition, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.appendBlockFromUrlNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase appendBlockFromUrlWithResponse(String containerName, + String blob, String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, + Long appendPosition, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "appendblock"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.appendBlockFromUrlSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, sourceRange, + sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void appendBlockFromUrl(String containerName, String blob, String sourceUrl, long contentLength, + String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + appendBlockFromUrlWithResponse(containerName, blob, sourceUrl, contentLength, sourceRange, sourceContentMD5, + sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, appendPosition, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, + Context.NONE); + } + + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where the contents + * are read from a source url. The Append Block operation is permitted only if the blob was created with + * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize Optional conditional header. The max length in bytes permitted for the append blob. If the Append + * Block operation would cause the blob to exceed that limit or if the blob size is already greater than the value + * specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 - + * Precondition Failed). + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response appendBlockFromUrlNoCustomHeadersWithResponse(String containerName, String blob, + String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, + Integer timeout, byte[] transactionalContentMD5, String leaseId, Long maxSize, Long appendPosition, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "appendblock"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.appendBlockFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sealWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - Long appendPosition) { + public Mono> sealWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition) { final String comp = "seal"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.seal( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - appendPosition, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.seal(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, appendPosition, accept, context)); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3313,117 +3228,77 @@ public Mono> sealWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sealWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - Long appendPosition, - Context context) { + public Mono> sealWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { final String comp = "seal"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.seal( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - appendPosition, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.seal(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + appendPosition, accept, context); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono sealAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - Long appendPosition) { - return sealWithResponseAsync( - containerName, - blob, - timeout, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition) - .flatMap(ignored -> Mono.empty()); + public Mono sealAsync(String containerName, String blob, Integer timeout, String requestId, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + Long appendPosition) { + return sealWithResponseAsync(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition).flatMap(ignored -> Mono.empty()); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3431,120 +3306,77 @@ public Mono sealAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono sealAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - Long appendPosition, - Context context) { - return sealWithResponseAsync( - containerName, - blob, - timeout, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition, - context) - .flatMap(ignored -> Mono.empty()); + public Mono sealAsync(String containerName, String blob, Integer timeout, String requestId, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + Long appendPosition, Context context) { + return sealWithResponseAsync(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context).flatMap(ignored -> Mono.empty()); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sealNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - Long appendPosition) { + public Mono> sealNoCustomHeadersWithResponseAsync(String containerName, String blob, Integer timeout, + String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, Long appendPosition) { final String comp = "seal"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.sealNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - appendPosition, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.sealNoCustomHeaders(this.client.getUrl(), containerName, blob, + comp, timeout, this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, appendPosition, accept, context)); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating - * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If - * it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - - * Precondition Failed). + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3552,39 +3384,137 @@ public Mono> sealNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sealNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - Long appendPosition, - Context context) { + public Mono> sealNoCustomHeadersWithResponseAsync(String containerName, String blob, Integer timeout, + String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { + final String comp = "seal"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.sealNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, appendPosition, accept, context); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase sealWithResponse(String containerName, String blob, + Integer timeout, String requestId, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { + final String comp = "seal"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.sealSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + appendPosition, accept, context); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void seal(String containerName, String blob, Integer timeout, String requestId, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + Long appendPosition) { + sealWithResponse(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, appendPosition, Context.NONE); + } + + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 + * version or later. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param appendPosition Optional conditional header, used only for the Append Block operation. A number indicating + * the byte offset to compare. Append Block will succeed only if the append position is equal to this number. If it + * is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition + * Failed). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response sealNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, Long appendPosition, Context context) { final String comp = "seal"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.sealNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - appendPosition, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.sealNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, appendPosition, accept, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java index 0a89b1832f90c..86d148d2e1917 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java @@ -6,128 +6,149 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; -/** Initializes a new instance of the AzureBlobStorage type. */ +/** + * Initializes a new instance of the AzureBlobStorage type. + */ public final class AzureBlobStorageImpl { - /** The URL of the service account, container, or blob that is the target of the desired operation. */ + /** + * The URL of the service account, container, or blob that is the target of the desired operation. + */ private final String url; /** * Gets The URL of the service account, container, or blob that is the target of the desired operation. - * + * * @return the url value. */ public String getUrl() { return this.url; } - /** Specifies the version of the operation to use for this request. */ + /** + * Specifies the version of the operation to use for this request. + */ private final String version; /** * Gets Specifies the version of the operation to use for this request. - * + * * @return the version value. */ public String getVersion() { return this.version; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ public SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The ServicesImpl object to access its operations. */ + /** + * The ServicesImpl object to access its operations. + */ private final ServicesImpl services; /** * Gets the ServicesImpl object to access its operations. - * + * * @return the ServicesImpl object. */ public ServicesImpl getServices() { return this.services; } - /** The ContainersImpl object to access its operations. */ + /** + * The ContainersImpl object to access its operations. + */ private final ContainersImpl containers; /** * Gets the ContainersImpl object to access its operations. - * + * * @return the ContainersImpl object. */ public ContainersImpl getContainers() { return this.containers; } - /** The BlobsImpl object to access its operations. */ + /** + * The BlobsImpl object to access its operations. + */ private final BlobsImpl blobs; /** * Gets the BlobsImpl object to access its operations. - * + * * @return the BlobsImpl object. */ public BlobsImpl getBlobs() { return this.blobs; } - /** The PageBlobsImpl object to access its operations. */ + /** + * The PageBlobsImpl object to access its operations. + */ private final PageBlobsImpl pageBlobs; /** * Gets the PageBlobsImpl object to access its operations. - * + * * @return the PageBlobsImpl object. */ public PageBlobsImpl getPageBlobs() { return this.pageBlobs; } - /** The AppendBlobsImpl object to access its operations. */ + /** + * The AppendBlobsImpl object to access its operations. + */ private final AppendBlobsImpl appendBlobs; /** * Gets the AppendBlobsImpl object to access its operations. - * + * * @return the AppendBlobsImpl object. */ public AppendBlobsImpl getAppendBlobs() { return this.appendBlobs; } - /** The BlockBlobsImpl object to access its operations. */ + /** + * The BlockBlobsImpl object to access its operations. + */ private final BlockBlobsImpl blockBlobs; /** * Gets the BlockBlobsImpl object to access its operations. - * + * * @return the BlockBlobsImpl object. */ public BlockBlobsImpl getBlockBlobs() { @@ -136,40 +157,36 @@ public BlockBlobsImpl getBlockBlobs() { /** * Initializes an instance of AzureBlobStorage client. - * + * * @param url The URL of the service account, container, or blob that is the target of the desired operation. * @param version Specifies the version of the operation to use for this request. */ - AzureBlobStorageImpl(String url, String version) { - this( - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(), - JacksonAdapter.createDefaultSerializerAdapter(), - url, - version); + public AzureBlobStorageImpl(String url, String version) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), url, version); } /** * Initializes an instance of AzureBlobStorage client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param url The URL of the service account, container, or blob that is the target of the desired operation. * @param version Specifies the version of the operation to use for this request. */ - AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version) { + public AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version) { this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), url, version); } /** * Initializes an instance of AzureBlobStorage client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param url The URL of the service account, container, or blob that is the target of the desired operation. * @param version Specifies the version of the operation to use for this request. */ - AzureBlobStorageImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String url, String version) { + public AzureBlobStorageImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String url, + String version) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.url = url; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index f89befa5c39f2..4d89ba2c7c626 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -30,7 +30,6 @@ import com.azure.core.util.FluxUtil; import com.azure.storage.blob.implementation.models.BlobDeleteType; import com.azure.storage.blob.implementation.models.BlobExpiryOptions; -import com.azure.storage.blob.implementation.models.BlobTags; import com.azure.storage.blob.implementation.models.BlobsAbortCopyFromURLHeaders; import com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders; import com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders; @@ -55,6 +54,7 @@ import com.azure.storage.blob.implementation.models.BlobsSetTierHeaders; import com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders; import com.azure.storage.blob.implementation.models.BlobsUndeleteHeaders; +import com.azure.storage.blob.implementation.models.BlobTags; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.QueryRequest; import com.azure.storage.blob.models.AccessTier; @@ -66,23 +66,30 @@ import com.azure.storage.blob.models.DeleteSnapshotsOptionType; import com.azure.storage.blob.models.EncryptionAlgorithmType; import com.azure.storage.blob.models.RehydratePriority; +import java.io.InputStream; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in Blobs. */ +/** + * An instance of this class provides access to all the operations defined in Blobs. + */ public final class BlobsImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BlobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureBlobStorageImpl client; /** * Initializes an instance of BlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ BlobsImpl(AzureBlobStorageImpl client) { @@ -98,1068 +105,1456 @@ public final class BlobsImpl { @ServiceInterface(name = "AzureBlobStorageBlob") public interface BlobsService { @Get("/{containerName}/{blob}") - @ExpectedResponses({200, 206}) + @ExpectedResponses({ 200, 206 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono>> download(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, + @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200, 206 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono downloadNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, + @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200, 206 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> download( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, - @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase downloadSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, + @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200, 206}) + @ExpectedResponses({ 200, 206 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response downloadNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, + @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Head("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getProperties(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Head("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono downloadNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-range-get-content-md5") Boolean rangeGetContentMD5, - @HeaderParam("x-ms-range-get-content-crc64") Boolean rangeGetContentCRC64, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> getPropertiesNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Head("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getProperties( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getPropertiesSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Head("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response getPropertiesNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Delete("/{containerName}/{blob}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> delete(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, + Context context); + + @Delete("/{containerName}/{blob}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getPropertiesNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> deleteNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, + Context context); @Delete("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> delete( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("deletetype") BlobDeleteType blobDeleteType, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase deleteSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, + Context context); @Delete("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response deleteNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("deletetype") BlobDeleteType blobDeleteType, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> undelete(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> undeleteNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase undeleteSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response undeleteNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setExpiry(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, + @HeaderParam("x-ms-expiry-time") String expiresOn, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setExpiryNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, + @HeaderParam("x-ms-expiry-time") String expiresOn, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase setExpirySync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, + @HeaderParam("x-ms-expiry-time") String expiresOn, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> deleteNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-delete-snapshots") DeleteSnapshotsOptionType deleteSnapshots, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("deletetype") BlobDeleteType blobDeleteType, - @HeaderParam("Accept") String accept, - Context context); + Response setExpiryNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, + @HeaderParam("x-ms-expiry-time") String expiresOn, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> undelete( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> setHttpHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> undeleteNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> setHttpHeadersNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setExpiry( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, - @HeaderParam("x-ms-expiry-time") String expiresOn, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase setHttpHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setExpiryNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-expiry-option") BlobExpiryOptions expiryOptions, - @HeaderParam("x-ms-expiry-time") String expiresOn, - @HeaderParam("Accept") String accept, - Context context); + Response setHttpHeadersNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setHttpHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> setImmutabilityPolicy(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setHttpHeadersNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> setImmutabilityPolicyNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setImmutabilityPolicy( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase setImmutabilityPolicySync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setImmutabilityPolicyNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("Accept") String accept, - Context context); + Response setImmutabilityPolicyNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("Accept") String accept, Context context); @Delete("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> deleteImmutabilityPolicy( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Delete("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> deleteImmutabilityPolicyNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase deleteImmutabilityPolicySync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response deleteImmutabilityPolicyNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setLegalHold(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-legal-hold") boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setLegalHoldNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-legal-hold") boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase setLegalHoldSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-legal-hold") boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response setLegalHoldNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-legal-hold") boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setMetadata(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setMetadataNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase setMetadataSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response setMetadataNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> acquireLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> acquireLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase acquireLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response acquireLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> releaseLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> deleteImmutabilityPolicyNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> releaseLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setLegalHold( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-legal-hold") boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase releaseLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setLegalHoldNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-legal-hold") boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + Response releaseLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setMetadata( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> renewLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setMetadataNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> renewLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> acquireLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-duration") Integer duration, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase renewLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> acquireLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-duration") Integer duration, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response renewLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> releaseLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> changeLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> releaseLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> changeLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> renewLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase changeLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> renewLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response changeLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> changeLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> breakLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> changeLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> breakLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> breakLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase breakLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> breakLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response breakLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> createSnapshot( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> createSnapshot(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> createSnapshotNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> createSnapshotNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> startCopyFromURL( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, - @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("x-ms-source-if-tags") String sourceIfTags, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-seal-blob") Boolean sealBlob, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase createSnapshotSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> startCopyFromURLNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, - @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("x-ms-source-if-tags") String sourceIfTags, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-seal-blob") Boolean sealBlob, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + Response createSnapshotNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> copyFromURL( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, - Context context); + Mono> startCopyFromURL(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @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("x-ms-source-if-tags") String sourceIfTags, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-seal-blob") Boolean sealBlob, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> copyFromURLNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, - Context context); + Mono> startCopyFromURLNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @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("x-ms-source-if-tags") String sourceIfTags, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-seal-blob") Boolean sealBlob, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({204}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> abortCopyFromURL( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, - @QueryParam("copyid") String copyId, - @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, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase startCopyFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @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("x-ms-source-if-tags") String sourceIfTags, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-seal-blob") Boolean sealBlob, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({204}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> abortCopyFromURLNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, - @QueryParam("copyid") String copyId, - @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, - @HeaderParam("Accept") String accept, - Context context); + Response startCopyFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @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("x-ms-source-if-tags") String sourceIfTags, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-seal-blob") Boolean sealBlob, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setTier( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("Accept") String accept, - Context context); + Mono> copyFromURL(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> copyFromURLNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase copyFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response copyFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-requires-sync") String xMsRequiresSync, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> abortCopyFromURL(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, + @QueryParam("copyid") String copyId, @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, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> abortCopyFromURLNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, + @QueryParam("copyid") String copyId, @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, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase abortCopyFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, + @QueryParam("copyid") String copyId, @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, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response abortCopyFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, + @QueryParam("copyid") String copyId, @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, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setTier(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setTierNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase setTierSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response setTierNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("versionid") String versionId, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getAccountInfo(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setTierNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @HeaderParam("x-ms-rehydrate-priority") RehydratePriority rehydratePriority, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("Accept") String accept, - Context context); + Mono> getAccountInfoNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getAccountInfo( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getAccountInfoSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response getAccountInfoNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); + + @Post("/{containerName}/{blob}") + @ExpectedResponses({ 200, 206 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono>> query(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") QueryRequest queryRequest, @HeaderParam("Accept") String accept, + Context context); + + @Post("/{containerName}/{blob}") + @ExpectedResponses({ 200, 206 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getAccountInfoNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono queryNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") QueryRequest queryRequest, @HeaderParam("Accept") String accept, + Context context); @Post("/{containerName}/{blob}") - @ExpectedResponses({200, 206}) + @ExpectedResponses({ 200, 206 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> query( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") QueryRequest queryRequest, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase querySync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") QueryRequest queryRequest, @HeaderParam("Accept") String accept, + Context context); @Post("/{containerName}/{blob}") - @ExpectedResponses({200, 206}) + @ExpectedResponses({ 200, 206 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response queryNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") QueryRequest queryRequest, @HeaderParam("Accept") String accept, + Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getTags(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono queryNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") QueryRequest queryRequest, - @HeaderParam("Accept") String accept, - Context context); + Mono> getTagsNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getTags( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getTagsSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getTagsNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("Accept") String accept, - Context context); + Response getTagsNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({204}) + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setTags( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-version") String version, - @QueryParam("timeout") Integer timeout, - @QueryParam("versionid") String versionId, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, - @BodyParam("application/xml") BlobTags tags, - @HeaderParam("Accept") String accept, - Context context); + Mono> setTags(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({204}) + @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setTagsNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-version") String version, - @QueryParam("timeout") Integer timeout, - @QueryParam("versionid") String versionId, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-lease-id") String leaseId, - @BodyParam("application/xml") BlobTags tags, - @HeaderParam("Accept") String accept, - Context context); + Mono> setTagsNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase setTagsSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response setTagsNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @QueryParam("timeout") Integer timeout, @QueryParam("versionid") String versionId, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-lease-id") String leaseId, @BodyParam("application/xml") BlobTags tags, + @HeaderParam("Accept") String accept, Context context); } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1167,23 +1562,11 @@ Mono> setTagsNoCustomHeaders( * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> downloadWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String range, - String leaseId, - Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo) { + public Mono>> downloadWithResponseAsync(String containerName, + String blob, String snapshot, String versionId, Integer timeout, String range, String leaseId, + Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -1200,67 +1583,46 @@ public Mono>> downloadWithRe encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.download( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - range, - leaseId, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.download(this.client.getUrl(), containerName, blob, snapshot, + versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1269,24 +1631,11 @@ public Mono>> downloadWithRe * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> downloadWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String range, - String leaseId, - Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - Context context) { + public Mono>> downloadWithResponseAsync(String containerName, + String blob, String snapshot, String versionId, Integer timeout, String range, String leaseId, + Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, Context context) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -1303,65 +1652,46 @@ public Mono>> downloadWithRe encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.download( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - range, - leaseId, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.download(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, leaseId, + rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1369,73 +1699,45 @@ public Mono>> downloadWithRe * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux downloadAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String range, - String leaseId, - Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo) { - return downloadWithResponseAsync( - containerName, - blob, - snapshot, - versionId, - timeout, - range, - leaseId, - rangeGetContentMD5, - rangeGetContentCRC64, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux downloadAsync(String containerName, String blob, String snapshot, String versionId, + Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo) { + return downloadWithResponseAsync(containerName, blob, snapshot, versionId, timeout, range, leaseId, + rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + requestId, cpkInfo).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1444,75 +1746,45 @@ public Flux downloadAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux downloadAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String range, - String leaseId, - Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - Context context) { - return downloadWithResponseAsync( - containerName, - blob, - snapshot, - versionId, - timeout, - range, - leaseId, - rangeGetContentMD5, - rangeGetContentCRC64, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - context) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux downloadAsync(String containerName, String blob, String snapshot, String versionId, + Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, Context context) { + return downloadWithResponseAsync(containerName, blob, snapshot, versionId, timeout, range, leaseId, + rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + requestId, cpkInfo, context).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1520,23 +1792,10 @@ public Flux downloadAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String range, - String leaseId, - Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo) { + public Mono downloadNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, + Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -1553,67 +1812,46 @@ public Mono downloadNoCustomHeadersWithResponseAsync( encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.downloadNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - range, - leaseId, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.downloadNoCustomHeaders(this.client.getUrl(), containerName, + blob, snapshot, versionId, timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 - * hash for the range, as long as the range is less than or equal to 4 MB in size. + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1622,115 +1860,10 @@ public Mono downloadNoCustomHeadersWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String range, - String leaseId, - Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - Context context) { - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.downloadNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - range, - leaseId, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); - } - - /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo) { + public Mono downloadNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, + Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, Context context) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -1747,82 +1880,58 @@ public Mono> getPropertiesWithResp encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.getProperties( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.downloadNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, + range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 + * hash for the range, as long as the range is less than or equal to 4 MB in size. + * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the response body along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - Context context) { + public ResponseBase downloadWithResponse(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, + Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, Context context) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -1839,207 +1948,166 @@ public Mono> getPropertiesWithResp encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getProperties( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.downloadSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, + leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 + * hash for the range, as long as the range is less than or equal to 4 MB in size. + * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo) { - return getPropertiesWithResponseAsync( - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo) - .flatMap(ignored -> Mono.empty()); + public InputStream download(String containerName, String blob, String snapshot, String versionId, Integer timeout, + String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo) { + return downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId, + rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + requestId, cpkInfo, Context.NONE).getValue(); } /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * + * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can + * also call Download to read a snapshot or version. + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param rangeGetContentMD5 When set to true and specified together with the Range, the service returns the MD5 + * hash for the range, as long as the range is less than or equal to 4 MB in size. + * @param rangeGetContentCRC64 When set to true and specified together with the Range, the service returns the CRC64 + * hash for the range, as long as the range is less than or equal to 4 MB in size. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - Context context) { - return getPropertiesWithResponseAsync( - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - context) - .flatMap(ignored -> Mono.empty()); + public Response downloadNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, + Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, Context context) { + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.downloadNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo) { + public Mono> getPropertiesWithResponseAsync(String containerName, + String blob, String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -2056,82 +2124,53 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync( encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.getPropertiesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.getProperties(this.client.getUrl(), containerName, blob, + snapshot, versionId, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context)); } /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - Context context) { + public Mono> getPropertiesWithResponseAsync(String containerName, + String blob, String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, Context context) { final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -2148,122 +2187,447 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync( encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPropertiesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getProperties(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); } /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed - * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, - * it is marked for deletion and becomes inaccessible immediately. However, the 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. - * + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesAsync(String containerName, String blob, String snapshot, String versionId, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) { + return getPropertiesWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesAsync(String containerName, String blob, String snapshot, String versionId, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, Context context) { + return getPropertiesWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo) { + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, + blob, snapshot, versionId, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context)); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, Context context) { + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, Context context) { + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPropertiesSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties(String containerName, String blob, String snapshot, String versionId, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) { + getPropertiesWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, Context.NONE); + } + + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, Context context) { + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the 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. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the - * blob itself. + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. + * if blob soft delete is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobDeleteType blobDeleteType) { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.delete( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - deleteSnapshots, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobDeleteType, - accept, - context)); + public Mono> deleteWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.delete(this.client.getUrl(), containerName, blob, snapshot, + versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context)); } /** @@ -2282,33 +2646,33 @@ public Mono> deleteWithResponseAsync( * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the - * blob itself. + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. + * if blob soft delete is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2316,46 +2680,18 @@ public Mono> deleteWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobDeleteType blobDeleteType, - Context context) { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - deleteSnapshots, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobDeleteType, - accept, - context); + public Mono> deleteWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.delete(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, + deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobDeleteType, accept, context); } /** @@ -2374,70 +2710,46 @@ public Mono> deleteWithResponseAsync( * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the - * blob itself. + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. + * if blob soft delete is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobDeleteType blobDeleteType) { - return deleteWithResponseAsync( - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - deleteSnapshots, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobDeleteType) - .flatMap(ignored -> Mono.empty()); + public Mono deleteAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, + String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + BlobDeleteType blobDeleteType) { + return deleteWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType) + .flatMap(ignored -> Mono.empty()); } /** @@ -2456,33 +2768,33 @@ public Mono deleteAsync( * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the - * blob itself. + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. + * if blob soft delete is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2490,39 +2802,13 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobDeleteType blobDeleteType, - Context context) { - return deleteWithResponseAsync( - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - deleteSnapshots, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobDeleteType, - context) - .flatMap(ignored -> Mono.empty()); + public Mono deleteAsync(String containerName, String blob, String snapshot, String versionId, Integer timeout, + String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + BlobDeleteType blobDeleteType, Context context) { + return deleteWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, context) + .flatMap(ignored -> Mono.empty()); } /** @@ -2541,80 +2827,52 @@ public Mono deleteAsync( * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the - * blob itself. + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. + * if blob soft delete is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobDeleteType blobDeleteType) { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.deleteNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - deleteSnapshots, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobDeleteType, - accept, - context)); + public Mono> deleteNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil + .withContext(context -> service.deleteNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, + versionId, timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context)); } /** @@ -2633,33 +2891,33 @@ public Mono> deleteNoCustomHeadersWithResponseAsync( * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: - * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the - * blob itself. + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob - * if blob soft delete is enabled. + * if blob soft delete is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2667,92 +2925,238 @@ public Mono> deleteNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - String versionId, - Integer timeout, - String leaseId, - DeleteSnapshotsOptionType deleteSnapshots, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobDeleteType blobDeleteType, - Context context) { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - snapshot, - versionId, - timeout, - leaseId, - deleteSnapshots, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobDeleteType, - accept, - context); + public Mono> deleteNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, + leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context); } /** - * Undelete a blob that was previously soft deleted. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * 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. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase deleteWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, + deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobDeleteType, accept, context); + } + + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently removed + * from the storage account. If the storage account's soft delete feature is enabled, then, when a blob is deleted, + * it is marked for deletion and becomes inaccessible immediately. However, the 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. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String containerName, String blob, String snapshot, String versionId, Integer timeout, + String leaseId, DeleteSnapshotsOptionType deleteSnapshots, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + BlobDeleteType blobDeleteType) { + deleteWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, Context.NONE); + } + + /** + * 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. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param deleteSnapshots Required if the blob has associated snapshots. Specify one of the following two options: + * include: Delete the base blob and all of its snapshots. only: Delete only the blob's snapshots and not the blob + * itself. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobDeleteType Optional. Only possible value is 'permanent', which specifies to permanently delete a blob + * if blob soft delete is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + String versionId, Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobDeleteType blobDeleteType, Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> undeleteWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId) { + public Mono> undeleteWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId) { final String comp = "undelete"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.undelete( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.undelete(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, accept, context)); } /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2760,32 +3164,24 @@ public Mono> undeleteWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> undeleteWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { + public Mono> undeleteWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, Context context) { final String comp = "undelete"; final String accept = "application/xml"; - return service.undelete( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + return service.undelete(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, accept, context); } /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2798,14 +3194,14 @@ public Mono undeleteAsync(String containerName, String blob, Integer timeo /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2813,56 +3209,46 @@ public Mono undeleteAsync(String containerName, String blob, Integer timeo * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono undeleteAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { + public Mono undeleteAsync(String containerName, String blob, Integer timeout, String requestId, + Context context) { return undeleteWithResponseAsync(containerName, blob, timeout, requestId, context) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> undeleteNoCustomHeadersWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId) { + public Mono> undeleteNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId) { final String comp = "undelete"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.undeleteNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.undeleteNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, timeout, this.client.getVersion(), requestId, accept, context)); } /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2870,33 +3256,94 @@ public Mono> undeleteNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> undeleteNoCustomHeadersWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { + public Mono> undeleteNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, Context context) { + final String comp = "undelete"; + final String accept = "application/xml"; + return service.undeleteNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase undeleteWithResponse(String containerName, String blob, + Integer timeout, String requestId, Context context) { + final String comp = "undelete"; + final String accept = "application/xml"; + return service.undeleteSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void undelete(String containerName, String blob, Integer timeout, String requestId) { + undeleteWithResponse(containerName, blob, timeout, requestId, Context.NONE); + } + + /** + * Undelete a blob that was previously soft deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response undeleteNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, Context context) { final String comp = "undelete"; final String accept = "application/xml"; - return service.undeleteNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + return service.undeleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); } /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param expiresOn The time to set the blob to expiry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2904,42 +3351,25 @@ public Mono> undeleteNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setExpiryWithResponseAsync( - String containerName, - String blob, - BlobExpiryOptions expiryOptions, - Integer timeout, - String requestId, - String expiresOn) { + public Mono> setExpiryWithResponseAsync(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) { final String comp = "expiry"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.setExpiry( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - expiryOptions, - expiresOn, - accept, - context)); + return FluxUtil.withContext(context -> service.setExpiry(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context)); } /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param expiresOn The time to set the blob to expiry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2948,41 +3378,25 @@ public Mono> setExpiryWithResponseAsyn * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setExpiryWithResponseAsync( - String containerName, - String blob, - BlobExpiryOptions expiryOptions, - Integer timeout, - String requestId, - String expiresOn, - Context context) { + public Mono> setExpiryWithResponseAsync(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { final String comp = "expiry"; final String accept = "application/xml"; - return service.setExpiry( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - expiryOptions, - expiresOn, - accept, - context); + return service.setExpiry(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, expiryOptions, expiresOn, accept, context); } /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param expiresOn The time to set the blob to expiry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2990,28 +3404,23 @@ public Mono> setExpiryWithResponseAsyn * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setExpiryAsync( - String containerName, - String blob, - BlobExpiryOptions expiryOptions, - Integer timeout, - String requestId, - String expiresOn) { + public Mono setExpiryAsync(String containerName, String blob, BlobExpiryOptions expiryOptions, + Integer timeout, String requestId, String expiresOn) { return setExpiryWithResponseAsync(containerName, blob, expiryOptions, timeout, requestId, expiresOn) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param expiresOn The time to set the blob to expiry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3020,29 +3429,23 @@ public Mono setExpiryAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setExpiryAsync( - String containerName, - String blob, - BlobExpiryOptions expiryOptions, - Integer timeout, - String requestId, - String expiresOn, - Context context) { + public Mono setExpiryAsync(String containerName, String blob, BlobExpiryOptions expiryOptions, + Integer timeout, String requestId, String expiresOn, Context context) { return setExpiryWithResponseAsync(containerName, blob, expiryOptions, timeout, requestId, expiresOn, context) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param expiresOn The time to set the blob to expiry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3050,42 +3453,25 @@ public Mono setExpiryAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setExpiryNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - BlobExpiryOptions expiryOptions, - Integer timeout, - String requestId, - String expiresOn) { + public Mono> setExpiryNoCustomHeadersWithResponseAsync(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) { final String comp = "expiry"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.setExpiryNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - expiryOptions, - expiresOn, - accept, - context)); + return FluxUtil.withContext(context -> service.setExpiryNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, timeout, this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context)); } /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param expiresOn The time to set the blob to expiry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3094,48 +3480,108 @@ public Mono> setExpiryNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setExpiryNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - BlobExpiryOptions expiryOptions, - Integer timeout, - String requestId, - String expiresOn, - Context context) { + public Mono> setExpiryNoCustomHeadersWithResponseAsync(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + final String comp = "expiry"; + final String accept = "application/xml"; + return service.setExpiryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setExpiryWithResponse(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { + final String comp = "expiry"; + final String accept = "application/xml"; + return service.setExpirySync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, expiryOptions, expiresOn, accept, context); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setExpiry(String containerName, String blob, BlobExpiryOptions expiryOptions, Integer timeout, + String requestId, String expiresOn) { + setExpiryWithResponse(containerName, blob, expiryOptions, timeout, requestId, expiresOn, Context.NONE); + } + + /** + * Sets the time a blob will expire and be deleted. + * + * @param containerName The container name. + * @param blob The blob name. + * @param expiryOptions Required. Indicates mode of the expiry time. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param expiresOn The time to set the blob to expiry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setExpiryNoCustomHeadersWithResponse(String containerName, String blob, + BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { final String comp = "expiry"; final String accept = "application/xml"; - return service.setExpiryNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - expiryOptions, - expiresOn, - accept, - context); + return service.setExpiryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context); } /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3143,18 +3589,9 @@ public Mono> setExpiryNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setHttpHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobHttpHeaders blobHttpHeaders) { + public Mono> setHttpHeadersWithResponseAsync(String containerName, + String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { final String comp = "properties"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -3188,54 +3625,34 @@ public Mono> setHttpHeadersWithRe } String contentDisposition = contentDispositionInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.setHttpHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentMd5Converted, - contentEncoding, - contentLanguage, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - contentDisposition, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.setHttpHeaders(this.client.getUrl(), containerName, blob, comp, + timeout, cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, + this.client.getVersion(), requestId, accept, context)); } /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3244,19 +3661,10 @@ public Mono> setHttpHeadersWithRe * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setHttpHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobHttpHeaders blobHttpHeaders, - Context context) { + public Mono> setHttpHeadersWithResponseAsync(String containerName, + String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, + Context context) { final String comp = "properties"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -3290,52 +3698,34 @@ public Mono> setHttpHeadersWithRe } String contentDisposition = contentDispositionInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHttpHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentMd5Converted, - contentEncoding, - contentLanguage, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - contentDisposition, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setHttpHeaders(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(), + requestId, accept, context); } /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3343,51 +3733,32 @@ public Mono> setHttpHeadersWithRe * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setHttpHeadersAsync( - String containerName, - String blob, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobHttpHeaders blobHttpHeaders) { - return setHttpHeadersWithResponseAsync( - containerName, - blob, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobHttpHeaders) - .flatMap(ignored -> Mono.empty()); + public Mono setHttpHeadersAsync(String containerName, String blob, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { + return setHttpHeadersWithResponseAsync(containerName, blob, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders) + .flatMap(ignored -> Mono.empty()); } /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3396,53 +3767,32 @@ public Mono setHttpHeadersAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setHttpHeadersAsync( - String containerName, - String blob, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobHttpHeaders blobHttpHeaders, - Context context) { - return setHttpHeadersWithResponseAsync( - containerName, - blob, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobHttpHeaders, - context) - .flatMap(ignored -> Mono.empty()); + public Mono setHttpHeadersAsync(String containerName, String blob, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) { + return setHttpHeadersWithResponseAsync(containerName, blob, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, context) + .flatMap(ignored -> Mono.empty()); } /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3450,18 +3800,9 @@ public Mono setHttpHeadersAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobHttpHeaders blobHttpHeaders) { + public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { final String comp = "properties"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -3495,54 +3836,34 @@ public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync( } String contentDisposition = contentDispositionInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.setHttpHeadersNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentMd5Converted, - contentEncoding, - contentLanguage, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - contentDisposition, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.setHttpHeadersNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, timeout, cacheControl, contentType, contentMd5Converted, contentEncoding, + contentLanguage, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, contentDisposition, this.client.getVersion(), requestId, accept, context)); } /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3551,19 +3872,10 @@ public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - BlobHttpHeaders blobHttpHeaders, - Context context) { + public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, + Context context) { final String comp = "properties"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -3597,148 +3909,273 @@ public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync( } String contentDisposition = contentDispositionInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHttpHeadersNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentMd5Converted, - contentEncoding, - contentLanguage, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - contentDisposition, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setHttpHeadersNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, + this.client.getVersion(), requestId, accept, context); } /** - * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * The Set HTTP Headers operation sets system properties on the blob. + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setImmutabilityPolicyWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - OffsetDateTime ifUnmodifiedSince, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode) { - final String comp = "immutabilityPolicies"; - final String accept = "application/xml"; - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.setImmutabilityPolicy( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - ifUnmodifiedSinceConverted, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - accept, - context)); - } - - /** - * The Set Immutability Policy operation sets the immutability policy on the blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setImmutabilityPolicyWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - OffsetDateTime ifUnmodifiedSince, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Context context) { - final String comp = "immutabilityPolicies"; + public ResponseBase setHttpHeadersWithResponse(String containerName, String blob, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, + Context context) { + final String comp = "properties"; final String accept = "application/xml"; - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.setImmutabilityPolicy( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - ifUnmodifiedSinceConverted, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - accept, - context); + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setHttpHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(), + requestId, accept, context); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setHttpHeaders(String containerName, String blob, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { + setHttpHeadersWithResponse(containerName, blob, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, blobHttpHeaders, Context.NONE); + } + + /** + * The Set HTTP Headers operation sets system properties on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobHttpHeaders Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setHttpHeadersNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders, Context context) { + final String comp = "properties"; + final String accept = "application/xml"; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setHttpHeadersNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setImmutabilityPolicyWithResponseAsync( + String containerName, String blob, Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.setImmutabilityPolicy(this.client.getUrl(), containerName, blob, + comp, timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, accept, context)); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setImmutabilityPolicyWithResponseAsync( + String containerName, String blob, Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.setImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, accept, context); } /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3747,37 +4184,25 @@ public Mono> setImmutabili * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setImmutabilityPolicyAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - OffsetDateTime ifUnmodifiedSince, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode) { - return setImmutabilityPolicyWithResponseAsync( - containerName, - blob, - timeout, - requestId, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode) - .flatMap(ignored -> Mono.empty()); + public Mono setImmutabilityPolicyAsync(String containerName, String blob, Integer timeout, String requestId, + OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode) { + return setImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, ifUnmodifiedSince, + immutabilityPolicyExpiry, immutabilityPolicyMode).flatMap(ignored -> Mono.empty()); } /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param context The context to associate with this operation. @@ -3787,39 +4212,25 @@ public Mono setImmutabilityPolicyAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setImmutabilityPolicyAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - OffsetDateTime ifUnmodifiedSince, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Context context) { - return setImmutabilityPolicyWithResponseAsync( - containerName, - blob, - timeout, - requestId, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - context) - .flatMap(ignored -> Mono.empty()); + public Mono setImmutabilityPolicyAsync(String containerName, String blob, Integer timeout, String requestId, + OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Context context) { + return setImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, ifUnmodifiedSince, + immutabilityPolicyExpiry, immutabilityPolicyMode, context).flatMap(ignored -> Mono.empty()); } /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3828,49 +4239,32 @@ public Mono setImmutabilityPolicyAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - OffsetDateTime ifUnmodifiedSince, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode) { + public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode) { final String comp = "immutabilityPolicies"; final String accept = "application/xml"; - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.setImmutabilityPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - ifUnmodifiedSinceConverted, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - accept, - context)); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.setImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, accept, context)); } /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param context The context to associate with this operation. @@ -3880,46 +4274,126 @@ public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsyn * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - OffsetDateTime ifUnmodifiedSince, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Context context) { + public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.setImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, accept, context); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setImmutabilityPolicyWithResponse(String containerName, + String blob, Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.setImmutabilityPolicySync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, accept, context); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId, + OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode) { + setImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, ifUnmodifiedSince, + immutabilityPolicyExpiry, immutabilityPolicyMode, Context.NONE); + } + + /** + * The Set Immutability Policy operation sets the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setImmutabilityPolicyNoCustomHeadersWithResponse(String containerName, String blob, + Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Context context) { final String comp = "immutabilityPolicies"; final String accept = "application/xml"; - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.setImmutabilityPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - ifUnmodifiedSinceConverted, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - accept, - context); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.setImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, accept, context); } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3927,33 +4401,23 @@ public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteImmutabilityPolicyWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId) { + String containerName, String blob, Integer timeout, String requestId) { final String comp = "immutabilityPolicies"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.deleteImmutabilityPolicy( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.deleteImmutabilityPolicy(this.client.getUrl(), containerName, + blob, comp, timeout, this.client.getVersion(), requestId, accept, context)); } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3962,53 +4426,45 @@ public Mono> deleteImmu */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteImmutabilityPolicyWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { + String containerName, String blob, Integer timeout, String requestId, Context context) { final String comp = "immutabilityPolicies"; final String accept = "application/xml"; - return service.deleteImmutabilityPolicy( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + return service.deleteImmutabilityPolicy(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteImmutabilityPolicyAsync( - String containerName, String blob, Integer timeout, String requestId) { + public Mono deleteImmutabilityPolicyAsync(String containerName, String blob, Integer timeout, + String requestId) { return deleteImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4016,126 +4472,1329 @@ public Mono deleteImmutabilityPolicyAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteImmutabilityPolicyAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { + public Mono deleteImmutabilityPolicyAsync(String containerName, String blob, Integer timeout, + String requestId, Context context) { return deleteImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, context) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteImmutabilityPolicyNoCustomHeadersWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId) { + public Mono> deleteImmutabilityPolicyNoCustomHeadersWithResponseAsync(String containerName, + String blob, Integer timeout, String requestId) { final String comp = "immutabilityPolicies"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.deleteImmutabilityPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.deleteImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, timeout, this.client.getVersion(), requestId, accept, context)); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteImmutabilityPolicyNoCustomHeadersWithResponseAsync(String containerName, + String blob, Integer timeout, String requestId, Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + return service.deleteImmutabilityPolicyNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase deleteImmutabilityPolicyWithResponse( + String containerName, String blob, Integer timeout, String requestId, Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + return service.deleteImmutabilityPolicySync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteImmutabilityPolicy(String containerName, String blob, Integer timeout, String requestId) { + deleteImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, Context.NONE); } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String containerName, String blob, + Integer timeout, String requestId, Context context) { + final String comp = "immutabilityPolicies"; + final String accept = "application/xml"; + return service.deleteImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setLegalHoldWithResponseAsync(String containerName, + String blob, boolean legalHold, Integer timeout, String requestId) { + final String comp = "legalhold"; + final String accept = "application/xml"; + return FluxUtil.withContext(context -> service.setLegalHold(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, legalHold, accept, context)); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setLegalHoldWithResponseAsync(String containerName, + String blob, boolean legalHold, Integer timeout, String requestId, Context context) { + final String comp = "legalhold"; + final String accept = "application/xml"; + return service.setLegalHold(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, legalHold, accept, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setLegalHoldAsync(String containerName, String blob, boolean legalHold, Integer timeout, + String requestId) { + return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setLegalHoldAsync(String containerName, String blob, boolean legalHold, Integer timeout, + String requestId, Context context) { + return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setLegalHoldNoCustomHeadersWithResponseAsync(String containerName, String blob, + boolean legalHold, Integer timeout, String requestId) { + final String comp = "legalhold"; + final String accept = "application/xml"; + return FluxUtil.withContext(context -> service.setLegalHoldNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, timeout, this.client.getVersion(), requestId, legalHold, accept, context)); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setLegalHoldNoCustomHeadersWithResponseAsync(String containerName, String blob, + boolean legalHold, Integer timeout, String requestId, Context context) { + final String comp = "legalhold"; + final String accept = "application/xml"; + return service.setLegalHoldNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, legalHold, accept, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setLegalHoldWithResponse(String containerName, String blob, + boolean legalHold, Integer timeout, String requestId, Context context) { + final String comp = "legalhold"; + final String accept = "application/xml"; + return service.setLegalHoldSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, legalHold, accept, context); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setLegalHold(String containerName, String blob, boolean legalHold, Integer timeout, String requestId) { + setLegalHoldWithResponse(containerName, blob, legalHold, timeout, requestId, Context.NONE); + } + + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setLegalHoldNoCustomHeadersWithResponse(String containerName, String blob, boolean legalHold, + Integer timeout, String requestId, Context context) { + final String comp = "legalhold"; + final String accept = "application/xml"; + return service.setLegalHoldNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, legalHold, accept, context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataWithResponseAsync(String containerName, + String blob, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.setMetadata(this.client.getUrl(), containerName, blob, comp, + timeout, metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context)); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataWithResponseAsync(String containerName, + String blob, Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setMetadata(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setMetadataAsync(String containerName, String blob, Integer timeout, Map metadata, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return setMetadataWithResponseAsync(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setMetadataAsync(String containerName, String blob, Integer timeout, Map metadata, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + Context context) { + return setMetadataWithResponseAsync(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.setMetadataNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, timeout, metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context)); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setMetadataNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, metadata, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setMetadataWithResponse(String containerName, String blob, + Integer timeout, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setMetadataSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata(String containerName, String blob, Integer timeout, Map metadata, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + setMetadataWithResponse(containerName, blob, timeout, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.NONE); + } + + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value + * pairs. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setMetadataNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "metadata"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireLeaseWithResponseAsync(String containerName, + String blob, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { + final String comp = "lease"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.acquireLease(this.client.getUrl(), containerName, blob, comp, + action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireLeaseWithResponseAsync(String containerName, + String blob, Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + final String comp = "lease"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLease(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireLeaseAsync(String containerName, String blob, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId) { + return acquireLeaseWithResponseAsync(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty()); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireLeaseAsync(String containerName, String blob, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + return acquireLeaseWithResponseAsync(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty()); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { + final String comp = "lease"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil + .withContext(context -> service.acquireLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, + action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + final String comp = "lease"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, + duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase acquireLeaseWithResponse(String containerName, String blob, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + final String comp = "lease"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void acquireLease(String containerName, String blob, Integer timeout, Integer duration, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId) { + acquireLeaseWithResponse(containerName, blob, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, Context.NONE); + } + + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteImmutabilityPolicyNoCustomHeadersWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { - final String comp = "immutabilityPolicies"; + public Response acquireLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "acquire"; final String accept = "application/xml"; - return service.deleteImmutabilityPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, + duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context); } /** - * The Set Legal Hold operation sets a legal hold on the blob. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. - * @param legalHold Specified if a legal hold should be set on the blob. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setLegalHoldWithResponseAsync( - String containerName, String blob, boolean legalHold, Integer timeout, String requestId) { - final String comp = "legalhold"; + public Mono> releaseLeaseWithResponseAsync(String containerName, + String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId) { + final String comp = "lease"; + final String action = "release"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.setLegalHold( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - legalHold, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.releaseLease(this.client.getUrl(), containerName, blob, comp, + action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context)); } /** - * The Set Legal Hold operation sets a legal hold on the blob. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. - * @param legalHold Specified if a legal hold should be set on the blob. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4143,57 +5802,70 @@ public Mono> setLegalHoldWithRespon * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setLegalHoldWithResponseAsync( - String containerName, String blob, boolean legalHold, Integer timeout, String requestId, Context context) { - final String comp = "legalhold"; + public Mono> releaseLeaseWithResponseAsync(String containerName, + String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "release"; final String accept = "application/xml"; - return service.setLegalHold( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - legalHold, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Set Legal Hold operation sets a legal hold on the blob. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. - * @param legalHold Specified if a legal hold should be set on the blob. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setLegalHoldAsync( - String containerName, String blob, boolean legalHold, Integer timeout, String requestId) { - return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId) - .flatMap(ignored -> Mono.empty()); + public Mono releaseLeaseAsync(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + return releaseLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty()); } /** - * The Set Legal Hold operation sets a legal hold on the blob. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. - * @param legalHold Specified if a legal hold should be set on the blob. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4201,59 +5873,70 @@ public Mono setLegalHoldAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setLegalHoldAsync( - String containerName, String blob, boolean legalHold, Integer timeout, String requestId, Context context) { - return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId, context) - .flatMap(ignored -> Mono.empty()); + public Mono releaseLeaseAsync(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, Context context) { + return releaseLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty()); } /** - * The Set Legal Hold operation sets a legal hold on the blob. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. - * @param legalHold Specified if a legal hold should be set on the blob. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setLegalHoldNoCustomHeadersWithResponseAsync( - String containerName, String blob, boolean legalHold, Integer timeout, String requestId) { - final String comp = "legalhold"; + public Mono> releaseLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId) { + final String comp = "lease"; + final String action = "release"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.setLegalHoldNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - legalHold, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); } /** - * The Set Legal Hold operation sets a legal hold on the blob. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. - * @param legalHold Specified if a legal hold should be set on the blob. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4261,1022 +5944,525 @@ public Mono> setLegalHoldNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setLegalHoldNoCustomHeadersWithResponseAsync( - String containerName, String blob, boolean legalHold, Integer timeout, String requestId, Context context) { - final String comp = "legalhold"; + public Mono> releaseLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "release"; final String accept = "application/xml"; - return service.setLegalHoldNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - legalHold, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - final String comp = "metadata"; + public ResponseBase releaseLeaseWithResponse(String containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "release"; final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.setMetadata( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - final String comp = "metadata"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadata( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + public void releaseLease(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + releaseLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, Context.NONE); } /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return setMetadataWithResponseAsync( - containerName, - blob, - timeout, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "release"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return setMetadataWithResponseAsync( - containerName, - blob, - timeout, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono> renewLeaseWithResponseAsync(String containerName, + String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId) { + final String comp = "lease"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.renewLease(this.client.getUrl(), containerName, blob, comp, + action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context)); } /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - final String comp = "metadata"; + public Mono> renewLeaseWithResponseAsync(String containerName, + String blob, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "renew"; final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.setMetadataNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value - * pairs. - * + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - final String comp = "metadata"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadataNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + public Mono renewLeaseAsync(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + return renewLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty()); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - final String comp = "lease"; - final String action = "acquire"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.acquireLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + public Mono renewLeaseAsync(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, Context context) { + return renewLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + public Mono> renewLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId) { final String comp = "lease"; - final String action = "acquire"; + final String action = "renew"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.renewLeaseNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireLeaseAsync( - String containerName, - String blob, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - return acquireLeaseWithResponseAsync( - containerName, - blob, - timeout, - duration, - proposedLeaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId) - .flatMap(ignored -> Mono.empty()); + public Mono> renewLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireLeaseAsync( - String containerName, - String blob, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - return acquireLeaseWithResponseAsync( - containerName, - blob, - timeout, - duration, - proposedLeaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public ResponseBase renewLeaseWithResponse(String containerName, String blob, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - final String comp = "lease"; - final String action = "acquire"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.acquireLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + public void renewLease(String containerName, String blob, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + renewLeaseWithResponse(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, Context.NONE); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. + * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + public Response renewLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "lease"; - final String action = "acquire"; + final String action = "renew"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { + public Mono> changeLeaseWithResponseAsync(String containerName, + String blob, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { final String comp = "lease"; - final String action = "release"; + final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.releaseLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.changeLease(this.client.getUrl(), containerName, blob, comp, + action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5284,111 +6470,77 @@ public Mono> releaseLeaseWithRespon * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + public Mono> changeLeaseWithResponseAsync(String containerName, + String blob, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { final String comp = "lease"; - final String action = "release"; + final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releaseLeaseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - return releaseLeaseWithResponseAsync( - containerName, - blob, - leaseId, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId) - .flatMap(ignored -> Mono.empty()); + public Mono changeLeaseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId) { + return changeLeaseWithResponseAsync(containerName, blob, leaseId, proposedLeaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty()); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5396,114 +6548,76 @@ public Mono releaseLeaseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releaseLeaseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - return releaseLeaseWithResponseAsync( - containerName, - blob, - leaseId, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public Mono changeLeaseAsync(String containerName, String blob, String leaseId, String proposedLeaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { + return changeLeaseWithResponseAsync(containerName, blob, leaseId, proposedLeaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { + public Mono> changeLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { final String comp = "lease"; - final String action = "release"; + final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.releaseLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5511,871 +6625,613 @@ public Mono> releaseLeaseNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + public Mono> changeLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { final String comp = "lease"; - final String action = "release"; + final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { + public ResponseBase changeLeaseWithResponse(String containerName, String blob, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { final String comp = "lease"; - final String action = "renew"; + final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.renewLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - final String comp = "lease"; - final String action = "renew"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + public void changeLease(String containerName, String blob, String leaseId, String proposedLeaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + changeLeaseWithResponse(containerName, blob, leaseId, proposedLeaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, Context.NONE); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renewLeaseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - return renewLeaseWithResponseAsync( - containerName, - blob, - leaseId, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId) - .flatMap(ignored -> Mono.empty()); + public Response changeLeaseNoCustomHeadersWithResponse(String containerName, String blob, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "change"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, + leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renewLeaseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - return renewLeaseWithResponseAsync( - containerName, - blob, - leaseId, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public Mono> breakLeaseWithResponseAsync(String containerName, + String blob, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { + final String comp = "lease"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.breakLease(this.client.getUrl(), containerName, blob, comp, + action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context)); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { + public Mono> breakLeaseWithResponseAsync(String containerName, + String blob, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { final String comp = "lease"; - final String action = "renew"; + final String action = "break"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.renewLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLease(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - final String comp = "lease"; - final String action = "renew"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + public Mono breakLeaseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + return breakLeaseWithResponseAsync(containerName, blob, timeout, breakPeriod, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty()); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseWithResponseAsync( - String containerName, - String blob, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - final String comp = "lease"; - final String action = "change"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.changeLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + public Mono breakLeaseAsync(String containerName, String blob, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, Context context) { + return breakLeaseWithResponseAsync(containerName, blob, timeout, breakPeriod, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseWithResponseAsync( - String containerName, - String blob, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + public Mono> breakLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId) { final String comp = "lease"; - final String action = "change"; + final String action = "break"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeLeaseAsync( - String containerName, - String blob, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - return changeLeaseWithResponseAsync( - containerName, - blob, - leaseId, - proposedLeaseId, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId) - .flatMap(ignored -> Mono.empty()); + public Mono> breakLeaseNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, + breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeLeaseAsync( - String containerName, - String blob, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - return changeLeaseWithResponseAsync( - containerName, - blob, - leaseId, - proposedLeaseId, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public ResponseBase breakLeaseWithResponse(String containerName, String blob, + Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "lease"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - final String comp = "lease"; - final String action = "change"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.changeLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + public void breakLease(String containerName, String blob, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + breakLeaseWithResponse(containerName, blob, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, Context.NONE); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + public Response breakLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "lease"; - final String action = "change"; + final String action = "break"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, + breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * The Create Snapshot operation creates a read-only snapshot of a blob. + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - final String comp = "lease"; - final String action = "break"; + public Mono> createSnapshotWithResponseAsync(String containerName, + String blob, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, + String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + final String comp = "snapshot"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.breakLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.createSnapshot(this.client.getUrl(), containerName, blob, comp, + timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, + this.client.getVersion(), requestId, accept, context)); } /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * The Create Snapshot operation creates a read-only snapshot of a blob. + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -6383,121 +7239,109 @@ public Mono> breakLeaseWithResponseAs * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - final String comp = "lease"; - final String action = "break"; + public Mono> createSnapshotWithResponseAsync(String containerName, + String blob, Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String leaseId, + String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "snapshot"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.createSnapshot(this.client.getUrl(), containerName, blob, comp, timeout, metadata, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId, + accept, context); } /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * The Create Snapshot operation creates a read-only snapshot of a blob. + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono breakLeaseAsync( - String containerName, - String blob, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - return breakLeaseWithResponseAsync( - containerName, - blob, - timeout, - breakPeriod, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId) - .flatMap(ignored -> Mono.empty()); + public Mono createSnapshotAsync(String containerName, String blob, Integer timeout, + Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + return createSnapshotWithResponseAsync(containerName, blob, timeout, metadata, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); } /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * The Create Snapshot operation creates a read-only snapshot of a blob. + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -6505,124 +7349,109 @@ public Mono breakLeaseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono breakLeaseAsync( - String containerName, - String blob, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - return breakLeaseWithResponseAsync( - containerName, - blob, - timeout, - breakPeriod, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public Mono createSnapshotAsync(String containerName, String blob, Integer timeout, + Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + return createSnapshotWithResponseAsync(containerName, blob, timeout, metadata, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, context) + .flatMap(ignored -> Mono.empty()); } /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * The Create Snapshot operation creates a read-only snapshot of a blob. + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - final String comp = "lease"; - final String action = "break"; + public Mono> createSnapshotNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + final String comp = "snapshot"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.breakLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.createSnapshotNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, timeout, metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + leaseId, this.client.getVersion(), requestId, accept, context)); } /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * The Create Snapshot operation creates a read-only snapshot of a blob. + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -6630,90 +7459,79 @@ public Mono> breakLeaseNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - final String comp = "lease"; - final String action = "break"; + public Mono> createSnapshotNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "snapshot"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.createSnapshotNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, metadata, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId, + accept, context); } /** * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSnapshotWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public ResponseBase createSnapshotWithResponse(String containerName, String blob, + Integer timeout, Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "snapshot"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -6736,83 +7554,91 @@ public Mono> createSnapshotWithRe encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.createSnapshot( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.createSnapshotSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId, + accept, context); + } + + /** + * The Create Snapshot operation creates a read-only snapshot of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void createSnapshot(String containerName, String blob, Integer timeout, Map metadata, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + createSnapshotWithResponse(containerName, blob, timeout, metadata, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, encryptionScopeParam, Context.NONE); } /** * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSnapshotWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Response createSnapshotNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + Map metadata, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "snapshot"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -6835,508 +7661,469 @@ public Mono> createSnapshotWithRe encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshot( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.createSnapshotNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, + this.client.getVersion(), requestId, accept, context); } /** - * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * * @param containerName The container name. * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSnapshotAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return createSnapshotWithResponseAsync( - containerName, - blob, - timeout, - metadata, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono> startCopyFromURLWithResponseAsync( + String containerName, String blob, String copySource, Integer timeout, Map metadata, + AccessTier tier, RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold) { + final String accept = "application/xml"; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil + .withContext(context -> service.startCopyFromURL(this.client.getUrl(), containerName, blob, timeout, + metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, + sealBlob, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context)); } /** - * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * * @param containerName The container name. * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createSnapshotAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return createSnapshotWithResponseAsync( - containerName, - blob, - timeout, - metadata, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono> startCopyFromURLWithResponseAsync( + String containerName, String blob, String copySource, Integer timeout, Map metadata, + AccessTier tier, RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.startCopyFromURL(this.client.getUrl(), containerName, blob, timeout, metadata, tier, + rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); } /** - * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * * @param containerName The container name. * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSnapshotNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - final String comp = "snapshot"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.createSnapshotNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + public Mono startCopyFromURLAsync(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, RehydratePriority rehydratePriority, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString, + Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold) { + return startCopyFromURLWithResponseAsync(containerName, blob, copySource, timeout, metadata, tier, + rehydratePriority, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, + sourceIfTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, + blobTagsString, sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold) + .flatMap(ignored -> Mono.empty()); } /** - * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * * @param containerName The container name. * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startCopyFromURLAsync(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, RehydratePriority rehydratePriority, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString, + Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, Context context) { + return startCopyFromURLWithResponseAsync(containerName, blob, copySource, timeout, metadata, tier, + rehydratePriority, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, + sourceIfTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, + blobTagsString, sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createSnapshotNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - Map metadata, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - final String comp = "snapshot"; + public Mono> startCopyFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold) { final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshotNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - metadata, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext( + context -> service.startCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, timeout, + metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, + sealBlob, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context)); } /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> startCopyFromURLWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - RehydratePriority rehydratePriority, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - String blobTagsString, - Boolean sealBlob, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold) { - final String accept = "application/xml"; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.startCopyFromURL( - this.client.getUrl(), - containerName, - blob, - timeout, - metadata, - tier, - rehydratePriority, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - blobTagsString, - sealBlob, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context)); + public Mono> startCopyFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.startCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, timeout, metadata, + tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); } /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. @@ -7346,113 +8133,71 @@ public Mono> startCopyFromURLWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> startCopyFromURLWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - RehydratePriority rehydratePriority, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - String blobTagsString, - Boolean sealBlob, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - Context context) { - final String accept = "application/xml"; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.startCopyFromURL( - this.client.getUrl(), - containerName, - blob, - timeout, - metadata, - tier, - rehydratePriority, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - blobTagsString, - sealBlob, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context); + public ResponseBase startCopyFromURLWithResponse(String containerName, + String blob, String copySource, Integer timeout, Map metadata, AccessTier tier, + RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.startCopyFromURLSync(this.client.getUrl(), containerName, blob, timeout, metadata, tier, + rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); } /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. @@ -7461,98 +8206,57 @@ public Mono> startCopyFromURLWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startCopyFromURLAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - RehydratePriority rehydratePriority, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - String blobTagsString, - Boolean sealBlob, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold) { - return startCopyFromURLWithResponseAsync( - containerName, - blob, - copySource, - timeout, - metadata, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - requestId, - blobTagsString, - sealBlob, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold) - .flatMap(ignored -> Mono.empty()); + public void startCopyFromURL(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, RehydratePriority rehydratePriority, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String leaseId, String requestId, String blobTagsString, + Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold) { + startCopyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, rehydratePriority, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, blobTagsString, + sealBlob, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, Context.NONE); } /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. @@ -7562,505 +8266,397 @@ public Mono startCopyFromURLAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startCopyFromURLAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - RehydratePriority rehydratePriority, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - String blobTagsString, - Boolean sealBlob, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - Context context) { - return startCopyFromURLWithResponseAsync( - containerName, - blob, - copySource, - timeout, - metadata, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - requestId, - blobTagsString, - sealBlob, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - context) - .flatMap(ignored -> Mono.empty()); + public Response startCopyFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, String blobTagsString, Boolean sealBlob, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + Context context) { + final String accept = "application/xml"; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.startCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, timeout, metadata, + tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); } /** - * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> copyFromURLWithResponseAsync(String containerName, + String blob, String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { + final String xMsRequiresSync = "true"; + final String accept = "application/xml"; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.copyFromURL(this.client.getUrl(), containerName, blob, + xMsRequiresSync, timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + copySourceAuthorization, encryptionScope, copySourceTags, accept, context)); + } + + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. - * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> startCopyFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - RehydratePriority rehydratePriority, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - String blobTagsString, - Boolean sealBlob, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold) { - final String accept = "application/xml"; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.startCopyFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - timeout, - metadata, - tier, - rehydratePriority, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - blobTagsString, - sealBlob, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context)); + public Mono> copyFromURLWithResponseAsync(String containerName, + String blob, String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, Context context) { + final String xMsRequiresSync = "true"; + final String accept = "application/xml"; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.copyFromURL(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, tier, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, + this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, + encryptionScope, copySourceTags, accept, context); } /** - * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response + * until the copy is complete. + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. - * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param sealBlob Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. - * @param context The context to associate with this operation. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> startCopyFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - RehydratePriority rehydratePriority, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - String blobTagsString, - Boolean sealBlob, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - Context context) { - final String accept = "application/xml"; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.startCopyFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - timeout, - metadata, - tier, - rehydratePriority, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - blobTagsString, - sealBlob, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context); + public Mono copyFromURLAsync(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { + return copyFromURLWithResponseAsync(containerName, blob, copySource, timeout, metadata, tier, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, + immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, + encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> copyFromURLWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - EncryptionScope encryptionScopeParam) { - final String xMsRequiresSync = "true"; - final String accept = "application/xml"; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.copyFromURL( - this.client.getUrl(), - containerName, - blob, - xMsRequiresSync, - timeout, - metadata, - tier, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - copySourceAuthorization, - encryptionScope, - copySourceTags, - accept, - context)); + public Mono copyFromURLAsync(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, + Context context) { + return copyFromURLWithResponseAsync(containerName, blob, copySource, timeout, metadata, tier, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, + immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, + encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> copyFromURLWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> copyFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { final String xMsRequiresSync = "true"; final String accept = "application/xml"; String encryptionScopeInternal = null; @@ -8068,474 +8664,322 @@ public Mono> copyFromURLWithResponse encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.copyFromURL( - this.client.getUrl(), - containerName, - blob, - xMsRequiresSync, - timeout, - metadata, - tier, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - copySourceAuthorization, - encryptionScope, - copySourceTags, - accept, - context); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext( + context -> service.copyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, xMsRequiresSync, + timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, + sourceContentMD5Converted, blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, + legalHold, copySourceAuthorization, encryptionScope, copySourceTags, accept, context)); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyFromURLAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - EncryptionScope encryptionScopeParam) { - return copyFromURLWithResponseAsync( - containerName, - blob, - copySource, - timeout, - metadata, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - requestId, - sourceContentMD5, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - copySourceAuthorization, - copySourceTags, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono> copyFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, Context context) { + final String xMsRequiresSync = "true"; + final String accept = "application/xml"; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.copyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, + metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, + encryptionScope, copySourceTags, accept, context); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyFromURLAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - EncryptionScope encryptionScopeParam, - Context context) { - return copyFromURLWithResponseAsync( - containerName, - blob, - copySource, - timeout, - metadata, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - leaseId, - requestId, - sourceContentMD5, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - copySourceAuthorization, - copySourceTags, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public ResponseBase copyFromURLWithResponse(String containerName, String blob, + String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, Context context) { + final String xMsRequiresSync = "true"; + final String accept = "application/xml"; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.copyFromURLSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, + tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, + this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, + encryptionScope, copySourceTags, accept, context); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> copyFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - EncryptionScope encryptionScopeParam) { - final String xMsRequiresSync = "true"; - final String accept = "application/xml"; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.copyFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - xMsRequiresSync, - timeout, - metadata, - tier, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - copySourceAuthorization, - encryptionScope, - copySourceTags, - accept, - context)); + public void copyFromURL(String containerName, String blob, String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam) { + copyFromURLWithResponse(containerName, blob, copySource, timeout, metadata, tier, sourceIfModifiedSince, + sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, leaseId, requestId, sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, + immutabilityPolicyMode, legalHold, copySourceAuthorization, copySourceTags, encryptionScopeParam, + Context.NONE); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param tier Optional. Indicates the tier to be set on the blob. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. * @param legalHold Specified if a legal hold should be set on the blob. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> copyFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - Map metadata, - AccessTier tier, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String leaseId, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - EncryptionScope encryptionScopeParam, - Context context) { + public Response copyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copySource, + Integer timeout, Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String leaseId, String requestId, byte[] sourceContentMD5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, EncryptionScope encryptionScopeParam, + Context context) { final String xMsRequiresSync = "true"; final String accept = "application/xml"; String encryptionScopeInternal = null; @@ -8543,63 +8987,38 @@ public Mono> copyFromURLNoCustomHeadersWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.copyFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - xMsRequiresSync, - timeout, - metadata, - tier, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - leaseId, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - copySourceAuthorization, - encryptionScope, - copySourceTags, - accept, - context); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.copyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, + timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, + encryptionScope, copySourceTags, accept, context); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -8607,40 +9026,27 @@ public Mono> copyFromURLNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> abortCopyFromURLWithResponseAsync( - String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId) { + String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId) { final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.abortCopyFromURL( - this.client.getUrl(), - containerName, - blob, - comp, - copyActionAbortConstant, - copyId, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.abortCopyFromURL(this.client.getUrl(), containerName, blob, comp, + copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context)); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -8649,69 +9055,53 @@ public Mono> abortCopyFromURLWi */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> abortCopyFromURLWithResponseAsync( - String containerName, - String blob, - String copyId, - Integer timeout, - String leaseId, - String requestId, - Context context) { + String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId, + Context context) { final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String accept = "application/xml"; - return service.abortCopyFromURL( - this.client.getUrl(), - containerName, - blob, - comp, - copyActionAbortConstant, - copyId, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + return service.abortCopyFromURL(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant, + copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono abortCopyFromURLAsync( - String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId) { + public Mono abortCopyFromURLAsync(String containerName, String blob, String copyId, Integer timeout, + String leaseId, String requestId) { return abortCopyFromURLWithResponseAsync(containerName, blob, copyId, timeout, leaseId, requestId) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -8719,72 +9109,54 @@ public Mono abortCopyFromURLAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono abortCopyFromURLAsync( - String containerName, - String blob, - String copyId, - Integer timeout, - String leaseId, - String requestId, - Context context) { + public Mono abortCopyFromURLAsync(String containerName, String blob, String copyId, Integer timeout, + String leaseId, String requestId, Context context) { return abortCopyFromURLWithResponseAsync(containerName, blob, copyId, timeout, leaseId, requestId, context) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync( - String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId) { + public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copyId, Integer timeout, String leaseId, String requestId) { final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.abortCopyFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - copyActionAbortConstant, - copyId, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.abortCopyFromURLNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), + requestId, accept, context)); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -8792,30 +9164,94 @@ public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String copyId, - Integer timeout, - String leaseId, - String requestId, - Context context) { + public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copyId, Integer timeout, String leaseId, String requestId, Context context) { + final String comp = "copy"; + final String copyActionAbortConstant = "abort"; + final String accept = "application/xml"; + return service.abortCopyFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, + copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase abortCopyFromURLWithResponse(String containerName, + String blob, String copyId, Integer timeout, String leaseId, String requestId, Context context) { + final String comp = "copy"; + final String copyActionAbortConstant = "abort"; + final String accept = "application/xml"; + return service.abortCopyFromURLSync(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant, + copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortCopyFromURL(String containerName, String blob, String copyId, Integer timeout, String leaseId, + String requestId) { + abortCopyFromURLWithResponse(containerName, blob, copyId, timeout, leaseId, requestId, Context.NONE); + } + + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with + * zero length and full metadata. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response abortCopyFromURLNoCustomHeadersWithResponse(String containerName, String blob, String copyId, + Integer timeout, String leaseId, String requestId, Context context) { final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String accept = "application/xml"; - return service.abortCopyFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - copyActionAbortConstant, - copyId, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + return service.abortCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); } /** @@ -8823,22 +9259,22 @@ public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync( * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8847,37 +9283,14 @@ public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTierWithResponseAsync( - String containerName, - String blob, - AccessTier tier, - String snapshot, - String versionId, - Integer timeout, - RehydratePriority rehydratePriority, - String requestId, - String leaseId, - String ifTags) { + public Mono> setTierWithResponseAsync(String containerName, String blob, + AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, + String requestId, String leaseId, String ifTags) { final String comp = "tier"; final String accept = "application/xml"; return FluxUtil.withContext( - context -> - service.setTier( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - versionId, - timeout, - tier, - rehydratePriority, - this.client.getVersion(), - requestId, - leaseId, - ifTags, - accept, - context)); + context -> service.setTier(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, + tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context)); } /** @@ -8885,22 +9298,22 @@ public Mono> setTierWithResponseAsync( * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param context The context to associate with this operation. @@ -8910,36 +9323,13 @@ public Mono> setTierWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTierWithResponseAsync( - String containerName, - String blob, - AccessTier tier, - String snapshot, - String versionId, - Integer timeout, - RehydratePriority rehydratePriority, - String requestId, - String leaseId, - String ifTags, - Context context) { + public Mono> setTierWithResponseAsync(String containerName, String blob, + AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, + String requestId, String leaseId, String ifTags, Context context) { final String comp = "tier"; final String accept = "application/xml"; - return service.setTier( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - versionId, - timeout, - tier, - rehydratePriority, - this.client.getVersion(), - requestId, - leaseId, - ifTags, - accept, - context); + return service.setTier(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier, + rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); } /** @@ -8947,22 +9337,22 @@ public Mono> setTierWithResponseAsync( * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8971,29 +9361,11 @@ public Mono> setTierWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setTierAsync( - String containerName, - String blob, - AccessTier tier, - String snapshot, - String versionId, - Integer timeout, - RehydratePriority rehydratePriority, - String requestId, - String leaseId, - String ifTags) { - return setTierWithResponseAsync( - containerName, - blob, - tier, - snapshot, - versionId, - timeout, - rehydratePriority, - requestId, - leaseId, - ifTags) - .flatMap(ignored -> Mono.empty()); + public Mono setTierAsync(String containerName, String blob, AccessTier tier, String snapshot, + String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, + String ifTags) { + return setTierWithResponseAsync(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, + requestId, leaseId, ifTags).flatMap(ignored -> Mono.empty()); } /** @@ -9001,22 +9373,22 @@ public Mono setTierAsync( * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param context The context to associate with this operation. @@ -9026,31 +9398,11 @@ public Mono setTierAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setTierAsync( - String containerName, - String blob, - AccessTier tier, - String snapshot, - String versionId, - Integer timeout, - RehydratePriority rehydratePriority, - String requestId, - String leaseId, - String ifTags, - Context context) { - return setTierWithResponseAsync( - containerName, - blob, - tier, - snapshot, - versionId, - timeout, - rehydratePriority, - requestId, - leaseId, - ifTags, - context) - .flatMap(ignored -> Mono.empty()); + public Mono setTierAsync(String containerName, String blob, AccessTier tier, String snapshot, + String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, + String ifTags, Context context) { + return setTierWithResponseAsync(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, + requestId, leaseId, ifTags, context).flatMap(ignored -> Mono.empty()); } /** @@ -9058,22 +9410,22 @@ public Mono setTierAsync( * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -9082,37 +9434,14 @@ public Mono setTierAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTierNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - AccessTier tier, - String snapshot, - String versionId, - Integer timeout, - RehydratePriority rehydratePriority, - String requestId, - String leaseId, - String ifTags) { + public Mono> setTierNoCustomHeadersWithResponseAsync(String containerName, String blob, + AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, + String requestId, String leaseId, String ifTags) { final String comp = "tier"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.setTierNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - versionId, - timeout, - tier, - rehydratePriority, - this.client.getVersion(), - requestId, - leaseId, - ifTags, - accept, - context)); + return FluxUtil.withContext(context -> service.setTierNoCustomHeaders(this.client.getUrl(), containerName, blob, + comp, snapshot, versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, + ifTags, accept, context)); } /** @@ -9120,22 +9449,22 @@ public Mono> setTierNoCustomHeadersWithResponseAsync( * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param context The context to associate with this operation. @@ -9145,84 +9474,152 @@ public Mono> setTierNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTierNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - AccessTier tier, - String snapshot, - String versionId, - Integer timeout, - RehydratePriority rehydratePriority, - String requestId, - String leaseId, - String ifTags, - Context context) { + public Mono> setTierNoCustomHeadersWithResponseAsync(String containerName, String blob, + AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, + String requestId, String leaseId, String ifTags, Context context) { final String comp = "tier"; final String accept = "application/xml"; - return service.setTierNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - versionId, - timeout, - tier, - rehydratePriority, - this.client.getVersion(), - requestId, - leaseId, - ifTags, - accept, - context); + return service.setTierNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, + timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); } /** - * Returns the sku name and account kind. - * + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setTierWithResponse(String containerName, String blob, + AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, + String requestId, String leaseId, String ifTags, Context context) { + final String comp = "tier"; + final String accept = "application/xml"; + return service.setTierSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier, + rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * + * @param containerName The container name. + * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTier(String containerName, String blob, AccessTier tier, String snapshot, String versionId, + Integer timeout, RehydratePriority rehydratePriority, String requestId, String leaseId, String ifTags) { + setTierWithResponse(containerName, blob, tier, snapshot, versionId, timeout, rehydratePriority, requestId, + leaseId, ifTags, Context.NONE); + } + + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage + * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's + * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines + * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. + * * @param containerName The container name. * @param blob The blob name. + * @param tier Indicates the tier to be set on the blob. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param rehydratePriority Optional: Indicates the priority with which to rehydrate an archived blob. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setTierNoCustomHeadersWithResponse(String containerName, String blob, AccessTier tier, + String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, String requestId, + String leaseId, String ifTags, Context context) { + final String comp = "tier"; + final String accept = "application/xml"; + return service.setTierNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, + timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId) { + public Mono> getAccountInfoWithResponseAsync(String containerName, + String blob) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccountInfo( - this.client.getUrl(), - containerName, - blob, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getAccountInfo(this.client.getUrl(), containerName, blob, + restype, comp, this.client.getVersion(), accept, context)); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -9230,161 +9627,164 @@ public Mono> getAccountInfoWithRe * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { + public Mono> getAccountInfoWithResponseAsync(String containerName, + String blob, Context context) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfo( - this.client.getUrl(), - containerName, - blob, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + return service.getAccountInfo(this.client.getUrl(), containerName, blob, restype, comp, + this.client.getVersion(), accept, context); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfoAsync(String containerName, String blob) { + return getAccountInfoWithResponseAsync(containerName, blob).flatMap(ignored -> Mono.empty()); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfoAsync(String containerName, String blob, Context context) { + return getAccountInfoWithResponseAsync(containerName, blob, context).flatMap(ignored -> Mono.empty()); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(String containerName, String blob) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return FluxUtil.withContext(context -> service.getAccountInfoNoCustomHeaders(this.client.getUrl(), + containerName, blob, restype, comp, this.client.getVersion(), accept, context)); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param blob The blob name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccountInfoAsync(String containerName, String blob, Integer timeout, String requestId) { - return getAccountInfoWithResponseAsync(containerName, blob, timeout, requestId) - .flatMap(ignored -> Mono.empty()); + public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(String containerName, String blob, + Context context) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getAccountInfoNoCustomHeaders(this.client.getUrl(), containerName, blob, restype, comp, + this.client.getVersion(), accept, context); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccountInfoAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { - return getAccountInfoWithResponseAsync(containerName, blob, timeout, requestId, context) - .flatMap(ignored -> Mono.empty()); + public ResponseBase getAccountInfoWithResponse(String containerName, String blob, + Context context) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getAccountInfoSync(this.client.getUrl(), containerName, blob, restype, comp, + this.client.getVersion(), accept, context); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId) { - final String restype = "account"; - final String comp = "properties"; - final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccountInfoNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + public void getAccountInfo(String containerName, String blob) { + getAccountInfoWithResponse(containerName, blob, Context.NONE); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, Context context) { + public Response getAccountInfoNoCustomHeadersWithResponse(String containerName, String blob, + Context context) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, blob, restype, comp, + this.client.getVersion(), accept, context); } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param queryRequest the query request. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -9393,20 +9793,10 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> queryWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - QueryRequest queryRequest, - CpkInfo cpkInfo) { + public Mono>> queryWithResponseAsync(String containerName, + String blob, String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + QueryRequest queryRequest, CpkInfo cpkInfo) { final String comp = "query"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -9424,57 +9814,38 @@ public Mono>> queryWithResponse encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.query( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - queryRequest, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.query(this.client.getUrl(), containerName, blob, comp, snapshot, + timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, + accept, context)); } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param queryRequest the query request. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. @@ -9484,21 +9855,10 @@ public Mono>> queryWithResponse * @return the response body along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> queryWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - QueryRequest queryRequest, - CpkInfo cpkInfo, - Context context) { + public Mono>> queryWithResponseAsync(String containerName, + String blob, String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + QueryRequest queryRequest, CpkInfo cpkInfo, Context context) { final String comp = "query"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -9516,55 +9876,37 @@ public Mono>> queryWithResponse encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.query( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - queryRequest, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.query(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, accept, context); } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param queryRequest the query request. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -9573,59 +9915,36 @@ public Mono>> queryWithResponse * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux queryAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - QueryRequest queryRequest, - CpkInfo cpkInfo) { - return queryWithResponseAsync( - containerName, - blob, - snapshot, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - queryRequest, - cpkInfo) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux queryAsync(String containerName, String blob, String snapshot, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) { + return queryWithResponseAsync(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo) + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param queryRequest the query request. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. @@ -9635,61 +9954,37 @@ public Flux queryAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux queryAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - QueryRequest queryRequest, - CpkInfo cpkInfo, - Context context) { - return queryWithResponseAsync( - containerName, - blob, - snapshot, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - queryRequest, - cpkInfo, - context) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux queryAsync(String containerName, String blob, String snapshot, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo, + Context context) { + return queryWithResponseAsync(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, context) + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param queryRequest the query request. * @param cpkInfo Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -9698,20 +9993,10 @@ public Flux queryAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - QueryRequest queryRequest, - CpkInfo cpkInfo) { + public Mono queryNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + QueryRequest queryRequest, CpkInfo cpkInfo) { final String comp = "query"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -9729,57 +10014,38 @@ public Mono queryNoCustomHeadersWithResponseAsync( encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.queryNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - queryRequest, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.queryNoCustomHeaders(this.client.getUrl(), containerName, blob, + comp, snapshot, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, queryRequest, accept, context)); } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param queryRequest the query request. * @param cpkInfo Parameter group. * @param context The context to associate with this operation. @@ -9789,21 +10055,171 @@ public Mono queryNoCustomHeadersWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - QueryRequest queryRequest, - CpkInfo cpkInfo, - Context context) { + public Mono queryNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + QueryRequest queryRequest, CpkInfo cpkInfo, Context context) { + final String comp = "query"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.queryNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, + accept, context); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase queryWithResponse(String containerName, String blob, + String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + QueryRequest queryRequest, CpkInfo cpkInfo, Context context) { + final String comp = "query"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.querySync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, + accept, context); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream query(String containerName, String blob, String snapshot, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) { + return queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, Context.NONE).getValue(); + } + + /** + * The Query operation enables users to select/project on blob data by providing simple query expressions. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param queryRequest the query request. + * @param cpkInfo Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response queryNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo, + Context context) { final String comp = "query"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -9821,49 +10237,32 @@ public Mono queryNoCustomHeadersWithResponseAsync( encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); } EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.queryNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - queryRequest, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.queryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, + accept, context); } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -9872,51 +10271,30 @@ public Mono queryNoCustomHeadersWithResponseAsync( * @return blob tags along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTagsWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String snapshot, - String versionId, - String ifTags, - String leaseId) { + public Mono> getTagsWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) { final String comp = "tags"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getTags( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - snapshot, - versionId, - ifTags, - leaseId, - accept, - context)); + return FluxUtil.withContext(context -> service.getTags(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context)); } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param context The context to associate with this operation. @@ -9926,50 +10304,31 @@ public Mono> getTagsWithResponseAsyn * @return blob tags along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTagsWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String snapshot, - String versionId, - String ifTags, - String leaseId, - Context context) { + public Mono> getTagsWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + Context context) { final String comp = "tags"; final String accept = "application/xml"; - return service.getTags( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - snapshot, - versionId, - ifTags, - leaseId, - accept, - context); + return service.getTags(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, snapshot, versionId, ifTags, leaseId, accept, context); } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -9978,35 +10337,28 @@ public Mono> getTagsWithResponseAsyn * @return blob tags on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTagsAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String snapshot, - String versionId, - String ifTags, - String leaseId) { + public Mono getTagsAsync(String containerName, String blob, Integer timeout, String requestId, + String snapshot, String versionId, String ifTags, String leaseId) { return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param context The context to associate with this operation. @@ -10016,37 +10368,28 @@ public Mono getTagsAsync( * @return blob tags on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTagsAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String snapshot, - String versionId, - String ifTags, - String leaseId, - Context context) { - return getTagsWithResponseAsync( - containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getTagsAsync(String containerName, String blob, Integer timeout, String requestId, + String snapshot, String versionId, String ifTags, String leaseId, Context context) { + return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, + context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10055,51 +10398,30 @@ public Mono getTagsAsync( * @return blob tags along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTagsNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String snapshot, - String versionId, - String ifTags, - String leaseId) { + public Mono> getTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) { final String comp = "tags"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getTagsNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - snapshot, - versionId, - ifTags, - leaseId, - accept, - context)); + return FluxUtil.withContext(context -> service.getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, + comp, timeout, this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context)); } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param context The context to associate with this operation. @@ -10109,48 +10431,126 @@ public Mono> getTagsNoCustomHeadersWithResponseAsync( * @return blob tags along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTagsNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String requestId, - String snapshot, - String versionId, - String ifTags, - String leaseId, - Context context) { + public Mono> getTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + return service.getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob tags along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getTagsWithResponse(String containerName, String blob, + Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, + Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + return service.getTagsSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, snapshot, versionId, ifTags, leaseId, accept, context); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob tags. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, + String versionId, String ifTags, String leaseId) { + return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, + Context.NONE).getValue(); + } + + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return blob tags along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String requestId, String snapshot, String versionId, String ifTags, String leaseId, Context context) { final String comp = "tags"; final String accept = "application/xml"; - return service.getTagsNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - this.client.getVersion(), - requestId, - snapshot, - versionId, - ifTags, - leaseId, - accept, - context); + return service.getTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); } /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. @@ -10160,55 +10560,32 @@ public Mono> getTagsNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTagsWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String versionId, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String requestId, - String ifTags, - String leaseId, - BlobTags tags) { + public Mono> setTagsWithResponseAsync(String containerName, String blob, + Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String requestId, String ifTags, String leaseId, BlobTags tags) { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.setTags( - this.client.getUrl(), - containerName, - blob, - comp, - this.client.getVersion(), - timeout, - versionId, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - requestId, - ifTags, - leaseId, - tags, - accept, - context)); + return FluxUtil.withContext(context -> service.setTags(this.client.getUrl(), containerName, blob, comp, + this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, + transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context)); } /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. @@ -10219,54 +10596,32 @@ public Mono> setTagsWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTagsWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String versionId, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String requestId, - String ifTags, - String leaseId, - BlobTags tags, - Context context) { + public Mono> setTagsWithResponseAsync(String containerName, String blob, + Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.setTags( - this.client.getUrl(), - containerName, - blob, - comp, - this.client.getVersion(), - timeout, - versionId, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - requestId, - ifTags, - leaseId, - tags, - accept, - context); + return service.setTags(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, + versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, + tags, accept, context); } /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. @@ -10276,45 +10631,27 @@ public Mono> setTagsWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setTagsAsync( - String containerName, - String blob, - Integer timeout, - String versionId, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String requestId, - String ifTags, - String leaseId, - BlobTags tags) { - return setTagsWithResponseAsync( - containerName, - blob, - timeout, - versionId, - transactionalContentMD5, - transactionalContentCrc64, - requestId, - ifTags, - leaseId, - tags) - .flatMap(ignored -> Mono.empty()); + public Mono setTagsAsync(String containerName, String blob, Integer timeout, String versionId, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, + String leaseId, BlobTags tags) { + return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5, + transactionalContentCrc64, requestId, ifTags, leaseId, tags).flatMap(ignored -> Mono.empty()); } /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. @@ -10325,47 +10662,27 @@ public Mono setTagsAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setTagsAsync( - String containerName, - String blob, - Integer timeout, - String versionId, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String requestId, - String ifTags, - String leaseId, - BlobTags tags, - Context context) { - return setTagsWithResponseAsync( - containerName, - blob, - timeout, - versionId, - transactionalContentMD5, - transactionalContentCrc64, - requestId, - ifTags, - leaseId, - tags, - context) - .flatMap(ignored -> Mono.empty()); + public Mono setTagsAsync(String containerName, String blob, Integer timeout, String versionId, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, + String leaseId, BlobTags tags, Context context) { + return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5, + transactionalContentCrc64, requestId, ifTags, leaseId, tags, context).flatMap(ignored -> Mono.empty()); } /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. @@ -10375,55 +10692,32 @@ public Mono setTagsAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTagsNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String versionId, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String requestId, - String ifTags, - String leaseId, - BlobTags tags) { + public Mono> setTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String requestId, String ifTags, String leaseId, BlobTags tags) { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.setTagsNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - this.client.getVersion(), - timeout, - versionId, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - requestId, - ifTags, - leaseId, - tags, - accept, - context)); + return FluxUtil.withContext(context -> service.setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, + comp, this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, + transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context)); } /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version - * of the blob to operate on. It's for service version 2019-10-10 and newer. + * of the blob to operate on. It's for service version 2019-10-10 and newer. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tags Blob tags. @@ -10434,37 +10728,116 @@ public Mono> setTagsNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setTagsNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - Integer timeout, - String versionId, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - String requestId, - String ifTags, - String leaseId, - BlobTags tags, - Context context) { + public Mono> setTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, + Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), + timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, + leaseId, tags, accept, context); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setTagsWithResponse(String containerName, String blob, + Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + String requestId, String ifTags, String leaseId, BlobTags tags, Context context) { + final String comp = "tags"; + final String accept = "application/xml"; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.setTagsSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, + versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, + tags, accept, context); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTags(String containerName, String blob, Integer timeout, String versionId, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, + String leaseId, BlobTags tags) { + setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, transactionalContentCrc64, + requestId, ifTags, leaseId, tags, Context.NONE); + } + + /** + * The Set Tags operation enables users to set tags on a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param versionId The version id parameter is an opaque DateTime value that, when present, specifies the version + * of the blob to operate on. It's for service version 2019-10-10 and newer. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tags Blob tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setTagsNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, + String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, + String ifTags, String leaseId, BlobTags tags, Context context) { final String comp = "tags"; final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.setTagsNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - this.client.getVersion(), - timeout, - versionId, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - requestId, - ifTags, - leaseId, - tags, - accept, - context); + return service.setTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, + transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index b0eb51ebaeb1c..6d45867550794 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -48,22 +48,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BlockBlobs. */ +/** + * An instance of this class provides access to all the operations defined in BlockBlobs. + */ public final class BlockBlobsImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BlockBlobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureBlobStorageImpl client; /** * Initializes an instance of BlockBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ BlockBlobsImpl(AzureBlobStorageImpl client) { - this.service = - RestProxy.create(BlockBlobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(BlockBlobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -75,524 +81,698 @@ public final class BlockBlobsImpl { @ServiceInterface(name = "AzureBlobStorageBloc") public interface BlockBlobsService { @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> upload(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> uploadNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> upload(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> uploadNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase uploadSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response uploadNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> putBlobFromUrl(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, + @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("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> putBlobFromUrlNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, + @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("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase putBlobFromUrlSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, + @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("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response putBlobFromUrlNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, + @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("x-ms-source-if-tags") String sourceIfTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-tags") String blobTagsString, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> upload( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> stageBlock(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> stageBlockNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> upload( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Mono> stageBlock(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Mono> stageBlockNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> putBlobFromUrl( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @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("x-ms-source-if-tags") String sourceIfTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase stageBlockSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> putBlobFromUrlNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @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("x-ms-source-if-tags") String sourceIfTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-copy-source-blob-properties") Boolean copySourceBlobProperties, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("x-ms-copy-source-tag-option") BlobCopySourceTagsMode copySourceTags, - @HeaderParam("Accept") String accept, - Context context); + Response stageBlockNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> stageBlock( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("blockid") String blockId, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> stageBlockFromURL(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> stageBlockNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("blockid") String blockId, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> stageBlockFromURLNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> stageBlock( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("blockid") String blockId, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase stageBlockFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> stageBlockNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("blockid") String blockId, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Response stageBlockFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> stageBlockFromURL( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("blockid") String blockId, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, - Context context); + Mono> commitBlockList(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @BodyParam("application/xml") BlockLookupList blocks, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> stageBlockFromURLNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("blockid") String blockId, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, - Context context); + Mono> commitBlockListNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @BodyParam("application/xml") BlockLookupList blocks, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> commitBlockList( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @BodyParam("application/xml") BlockLookupList blocks, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase commitBlockListSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @BodyParam("application/xml") BlockLookupList blocks, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response commitBlockListNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @HeaderParam("x-ms-access-tier") AccessTier tier, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("x-ms-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @BodyParam("application/xml") BlockLookupList blocks, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getBlockList(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> commitBlockListNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @HeaderParam("x-ms-access-tier") AccessTier tier, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @BodyParam("application/xml") BlockLookupList blocks, - @HeaderParam("Accept") String accept, - Context context); + Mono> getBlockListNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getBlockList( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("blocklisttype") BlockListType listType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getBlockListSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getBlockListNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("blocklisttype") BlockListType listType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response getBlockListNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("blocklisttype") BlockListType listType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-if-tags") String ifTags, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); } /** @@ -600,32 +780,32 @@ Mono> getBlockListNoCustomHeaders( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -640,30 +820,13 @@ Mono> getBlockListNoCustomHeaders( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -718,51 +881,20 @@ public Mono> uploadWithResponseAsync String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.upload( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.upload(this.client.getUrl(), containerName, blob, blobType, + timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context)); } /** @@ -770,32 +902,32 @@ public Mono> uploadWithResponseAsync * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -811,31 +943,13 @@ public Mono> uploadWithResponseAsync * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -890,49 +1004,20 @@ public Mono> uploadWithResponseAsync String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.upload( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context); + return service.upload(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); } /** @@ -940,32 +1025,32 @@ public Mono> uploadWithResponseAsync * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -980,55 +1065,16 @@ public Mono> uploadWithResponseAsync * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return uploadWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono uploadAsync(String containerName, String blob, long contentLength, Flux body, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64, + blobHttpHeaders, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** @@ -1036,32 +1082,32 @@ public Mono uploadAsync( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1077,57 +1123,16 @@ public Mono uploadAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return uploadWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono uploadAsync(String containerName, String blob, long contentLength, Flux body, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64, + blobHttpHeaders, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** @@ -1135,32 +1140,32 @@ public Mono uploadAsync( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1175,30 +1180,13 @@ public Mono uploadAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1253,51 +1241,20 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.uploadNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, + blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, + contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context)); } /** @@ -1305,32 +1262,32 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1346,31 +1303,13 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1425,49 +1364,20 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.uploadNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context); + return service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); } /** @@ -1475,32 +1385,32 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1515,30 +1425,13 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1593,51 +1486,20 @@ public Mono> uploadWithResponseAsync String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.upload( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.upload(this.client.getUrl(), containerName, blob, blobType, + timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context)); } /** @@ -1645,32 +1507,32 @@ public Mono> uploadWithResponseAsync * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1686,31 +1548,13 @@ public Mono> uploadWithResponseAsync * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1765,49 +1609,20 @@ public Mono> uploadWithResponseAsync String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.upload( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context); + return service.upload(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); } /** @@ -1815,32 +1630,32 @@ public Mono> uploadWithResponseAsync * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1855,55 +1670,16 @@ public Mono> uploadWithResponseAsync * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return uploadWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono uploadAsync(String containerName, String blob, long contentLength, BinaryData body, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64, + blobHttpHeaders, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** @@ -1911,32 +1687,32 @@ public Mono uploadAsync( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1952,57 +1728,16 @@ public Mono uploadAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return uploadWithResponseAsync( - containerName, - blob, - contentLength, - body, - timeout, - transactionalContentMD5, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono uploadAsync(String containerName, String blob, long contentLength, BinaryData body, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, + metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64, + blobHttpHeaders, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** @@ -2010,32 +1745,32 @@ public Mono uploadAsync( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -2050,30 +1785,13 @@ public Mono uploadAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -2128,51 +1846,20 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.uploadNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, + blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, + contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context)); } /** @@ -2180,32 +1867,32 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -2221,31 +1908,13 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - byte[] transactionalContentCrc64, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -2300,138 +1969,75 @@ public Mono> uploadNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.uploadNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - transactionalContentCrc64Converted, - body, - accept, - context); + return service.uploadNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); } /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given - * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob - * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial - * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put - * Block List. - * + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the + * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a + * block blob, use the Put Block List operation. + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> putBlobFromUrlWithResponseAsync( - String containerName, - String blob, - long contentLength, - String copySource, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - Boolean copySourceBlobProperties, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public ResponseBase uploadWithResponse(String containerName, String blob, + long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -2486,109 +2092,114 @@ public Mono> putBlobFromUrlW String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return FluxUtil.withContext( - context -> - service.putBlobFromUrl( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - copySource, - copySourceBlobProperties, - copySourceAuthorization, - copySourceTags, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.uploadSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); } /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given - * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob - * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial - * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put - * Block List. - * + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the + * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a + * block blob, use the Put Block List operation. + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void upload(String containerName, String blob, long contentLength, BinaryData body, Integer timeout, + byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + uploadWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, metadata, + leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, + immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, transactionalContentCrc64, blobHttpHeaders, + cpkInfo, encryptionScopeParam, Context.NONE); + } + + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob + * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the + * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a + * block blob, use the Put Block List operation. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. @@ -2596,39 +2207,16 @@ public Mono> putBlobFromUrlW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> putBlobFromUrlWithResponseAsync( - String containerName, - String blob, - long contentLength, - String copySource, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - Boolean copySourceBlobProperties, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Response uploadNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + BinaryData body, Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, + AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + byte[] transactionalContentCrc64, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -2683,297 +2271,20 @@ public Mono> putBlobFromUrlW String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return service.putBlobFromUrl( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - copySource, - copySourceBlobProperties, - copySourceAuthorization, - copySourceTags, - accept, - context); - } - - /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given - * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob - * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial - * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put - * Block List. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono putBlobFromUrlAsync( - String containerName, - String blob, - long contentLength, - String copySource, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - Boolean copySourceBlobProperties, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return putBlobFromUrlWithResponseAsync( - containerName, - blob, - contentLength, - copySource, - timeout, - transactionalContentMD5, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - requestId, - sourceContentMD5, - blobTagsString, - copySourceBlobProperties, - copySourceAuthorization, - copySourceTags, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); - } - - /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given - * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob - * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial - * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put - * Block List. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. - * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono putBlobFromUrlAsync( - String containerName, - String blob, - long contentLength, - String copySource, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - Boolean copySourceBlobProperties, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return putBlobFromUrlWithResponseAsync( - containerName, - blob, - contentLength, - copySource, - timeout, - transactionalContentMD5, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - requestId, - sourceContentMD5, - blobTagsString, - copySourceBlobProperties, - copySourceAuthorization, - copySourceTags, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.uploadNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); } /** @@ -2982,87 +2293,67 @@ public Mono putBlobFromUrlAsync( * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. + * copied. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - String copySource, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - Boolean copySourceBlobProperties, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> putBlobFromUrlWithResponseAsync( + String containerName, String blob, long contentLength, String copySource, Integer timeout, + byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, + String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -3117,58 +2408,23 @@ public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return FluxUtil.withContext( - context -> - service.putBlobFromUrlNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - copySource, - copySourceBlobProperties, - copySourceAuthorization, - copySourceTags, - accept, - context)); + return FluxUtil.withContext(context -> service.putBlobFromUrl(this.client.getUrl(), containerName, blob, + blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, + contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context)); } /** @@ -3177,49 +2433,49 @@ public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync( * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be - * copied. + * copied. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the - * tags specified by x-ms-tags. + * tags specified by x-ms-tags. * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. @@ -3227,39 +2483,18 @@ public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - String copySource, - Integer timeout, - byte[] transactionalContentMD5, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String sourceIfTags, - String requestId, - byte[] sourceContentMD5, - String blobTagsString, - Boolean copySourceBlobProperties, - String copySourceAuthorization, - BlobCopySourceTagsMode copySourceTags, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> putBlobFromUrlWithResponseAsync( + String containerName, String blob, long contentLength, String copySource, Integer timeout, + byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, + String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String blobType = "BlockBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -3314,98 +2549,1145 @@ public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return service.putBlobFromUrlNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - transactionalContentMD5Converted, - contentLength, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - this.client.getVersion(), - requestId, - sourceContentMD5Converted, - blobTagsString, - copySource, - copySourceBlobProperties, - copySourceAuthorization, - copySourceTags, - accept, - context); + return service.putBlobFromUrl(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context); } /** - * The Stage Block operation creates a new block to be committed as part of a blob. - * + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * * @param containerName The container name. * @param blob The blob name. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - final String comp = "block"; + public Mono putBlobFromUrlAsync(String containerName, String blob, long contentLength, String copySource, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, + String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + return putBlobFromUrlWithResponseAsync(containerName, blob, contentLength, copySource, timeout, + transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, + copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono putBlobFromUrlAsync(String containerName, String blob, long contentLength, String copySource, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, + String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + return putBlobFromUrlWithResponseAsync(containerName, blob, contentLength, copySource, timeout, + transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + requestId, sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, + copySourceTags, blobHttpHeaders, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + final String blobType = "BlockBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + return FluxUtil.withContext(context -> service.putBlobFromUrlNoCustomHeaders(this.client.getUrl(), + containerName, blob, blobType, timeout, transactionalContentMD5Converted, contentLength, contentType, + contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context)); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "BlockBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + return service.putBlobFromUrlNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase putBlobFromUrlWithResponse(String containerName, + String blob, long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "BlockBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + return service.putBlobFromUrlSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void putBlobFromUrl(String containerName, String blob, long contentLength, String copySource, + Integer timeout, byte[] transactionalContentMD5, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, + String blobTagsString, Boolean copySourceBlobProperties, String copySourceAuthorization, + BlobCopySourceTagsMode copySourceTags, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + putBlobFromUrlWithResponse(containerName, blob, contentLength, copySource, timeout, transactionalContentMD5, + metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, requestId, + sourceContentMD5, blobTagsString, copySourceBlobProperties, copySourceAuthorization, copySourceTags, + blobHttpHeaders, cpkInfo, encryptionScopeParam, Context.NONE); + } + + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read from a given + * URL. This API is supported beginning with the 2020-04-08 version. Partial updates are not supported with Put Blob + * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial + * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put + * Block List. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param sourceIfTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param copySourceBlobProperties Optional, default is true. Indicates if properties from the source blob should be + * copied. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param copySourceTags Optional, default 'replace'. Indicates if source tags should be copied or replaced with the + * tags specified by x-ms-tags. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putBlobFromUrlNoCustomHeadersWithResponse(String containerName, String blob, + long contentLength, String copySource, Integer timeout, byte[] transactionalContentMD5, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String requestId, byte[] sourceContentMD5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTagsMode copySourceTags, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "BlockBlob"; + final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + return service.putBlobFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), + requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, + copySourceAuthorization, copySourceTags, accept, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockWithResponseAsync(String containerName, + String blob, String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return FluxUtil.withContext(context -> service.stageBlock(this.client.getUrl(), containerName, blob, comp, + blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), + requestId, body, accept, context)); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockWithResponseAsync(String containerName, + String blob, String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.stageBlock(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), requestId, body, + accept, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stageBlockAsync(String containerName, String blob, String blockId, long contentLength, + Flux body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, + String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, leaseId, requestId, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stageBlockAsync(String containerName, String blob, String blockId, long contentLength, + Flux body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, + String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, leaseId, requestId, cpkInfo, encryptionScopeParam, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return FluxUtil.withContext(context -> service.stageBlockNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, + timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + this.client.getVersion(), requestId, body, accept, context)); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + String blockId, long contentLength, Flux body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + return service.stageBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), + requestId, body, accept, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockWithResponseAsync(String containerName, + String blob, String blockId, long contentLength, BinaryData body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; if (cpkInfo != null) { @@ -3429,48 +3711,30 @@ public Mono> stageBlockWithRespo String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.stageBlock( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.stageBlock(this.client.getUrl(), containerName, blob, comp, + blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), + requestId, body, accept, context)); } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3480,20 +3744,10 @@ public Mono> stageBlockWithRespo * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> stageBlockWithResponseAsync(String containerName, + String blob, String blockId, long contentLength, BinaryData body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3518,46 +3772,30 @@ public Mono> stageBlockWithRespo String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlock( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.stageBlock(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), requestId, body, + accept, context); } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3566,53 +3804,32 @@ public Mono> stageBlockWithRespo * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockAsync( - String containerName, - String blob, - String blockId, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return stageBlockWithResponseAsync( - containerName, - blob, - blockId, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - leaseId, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono stageBlockAsync(String containerName, String blob, String blockId, long contentLength, + BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, + String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, leaseId, requestId, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3622,55 +3839,32 @@ public Mono stageBlockAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockAsync( - String containerName, - String blob, - String blockId, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return stageBlockWithResponseAsync( - containerName, - blob, - blockId, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - leaseId, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono stageBlockAsync(String containerName, String blob, String blockId, long contentLength, + BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, + String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, leaseId, requestId, cpkInfo, encryptionScopeParam, context) + .flatMap(ignored -> Mono.empty()); } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3679,19 +3873,10 @@ public Mono stageBlockAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> stageBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + String blockId, long contentLength, BinaryData body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3716,48 +3901,30 @@ public Mono> stageBlockNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.stageBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.stageBlockNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, blockId, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, + timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3767,20 +3934,10 @@ public Mono> stageBlockNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> stageBlockNoCustomHeadersWithResponseAsync(String containerName, String blob, + String blockId, long contentLength, BinaryData body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3805,67 +3962,43 @@ public Mono> stageBlockNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.stageBlockNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), + requestId, body, accept, context); } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public ResponseBase stageBlockWithResponse(String containerName, String blob, + String blockId, long contentLength, BinaryData body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3890,71 +4023,75 @@ public Mono> stageBlockWithRespo String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.stageBlock( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return service.stageBlockSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), requestId, body, + accept, context); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stageBlock(String containerName, String blob, String blockId, long contentLength, BinaryData body, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String leaseId, + String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + stageBlockWithResponse(containerName, blob, blockId, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, leaseId, requestId, cpkInfo, encryptionScopeParam, Context.NONE); } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param body Initial data. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Response stageBlockNoCustomHeadersWithResponse(String containerName, String blob, String blockId, + long contentLength, BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + Context context) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -3979,269 +4116,308 @@ public Mono> stageBlockWithRespo String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlock( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.stageBlockNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), + requestId, body, accept, context); } /** - * The Stage Block operation creates a new block to be committed as part of a blob. - * + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockFromURLWithResponseAsync( + String containerName, String blob, String blockId, long contentLength, String sourceUrl, String sourceRange, + byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return FluxUtil.withContext(context -> service.stageBlockFromURL(this.client.getUrl(), containerName, blob, + comp, blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, + sourceContentcrc64Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context)); + } + + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockAsync( - String containerName, - String blob, - String blockId, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return stageBlockWithResponseAsync( - containerName, - blob, - blockId, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - leaseId, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono> stageBlockFromURLWithResponseAsync( + String containerName, String blob, String blockId, long contentLength, String sourceUrl, String sourceRange, + byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.stageBlockFromURL(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, + copySourceAuthorization, accept, context); } /** - * The Stage Block operation creates a new block to be committed as part of a blob. - * + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockAsync( - String containerName, - String blob, - String blockId, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return stageBlockWithResponseAsync( - containerName, - blob, - blockId, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - leaseId, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono stageBlockFromURLAsync(String containerName, String blob, String blockId, long contentLength, + String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return stageBlockFromURLWithResponseAsync(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); } /** - * The Stage Block operation creates a new block to be committed as part of a blob. - * + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - final String comp = "block"; - final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return FluxUtil.withContext( - context -> - service.stageBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context)); + public Mono stageBlockFromURLAsync(String containerName, String blob, String blockId, long contentLength, + String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return stageBlockFromURLWithResponseAsync(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, + context).flatMap(ignored -> Mono.empty()); } /** - * The Stage Block operation creates a new block to be committed as part of a blob. - * + * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from + * a URL. + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String leaseId, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, + String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -4264,86 +4440,62 @@ public Mono> stageBlockNoCustomHeadersWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlockNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - this.client.getVersion(), - requestId, - body, - accept, - context); + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return FluxUtil.withContext(context -> service.stageBlockFromURLNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, + sourceContentcrc64Converted, timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, leaseId, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context)); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockFromURLWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - String sourceUrl, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, + String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -4368,98 +4520,60 @@ public Mono> stageBlockFr String encryptionScope = encryptionScopeInternal; String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.stageBlockFromURL( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context)); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.stageBlockFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockFromURLWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - String sourceUrl, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public ResponseBase stageBlockFromURLWithResponse(String containerName, + String blob, String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, + String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "block"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -4484,255 +4598,227 @@ public Mono> stageBlockFr String encryptionScope = encryptionScopeInternal; String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURL( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.stageBlockFromURLSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, + copySourceAuthorization, accept, context); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockFromURLAsync( - String containerName, - String blob, - String blockId, - long contentLength, - String sourceUrl, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return stageBlockFromURLWithResponseAsync( - containerName, - blob, - blockId, - contentLength, - sourceUrl, - sourceRange, - sourceContentMD5, - sourceContentcrc64, - timeout, - leaseId, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - requestId, - copySourceAuthorization, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public void stageBlockFromURL(String containerName, String blob, String blockId, long contentLength, + String sourceUrl, String sourceRange, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, + sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, cpkInfo, encryptionScopeParam, + Context.NONE); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. + * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter + * must be the same size for each block. * @param contentLength The length of the request. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stageBlockFromURLAsync( - String containerName, - String blob, - String blockId, - long contentLength, - String sourceUrl, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return stageBlockFromURLWithResponseAsync( - containerName, - blob, - blockId, - contentLength, - sourceUrl, - sourceRange, - sourceContentMD5, - sourceContentcrc64, - timeout, - leaseId, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - requestId, - copySourceAuthorization, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Response stageBlockFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String blockId, long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String requestId, + String copySourceAuthorization, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "block"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.stageBlockFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); } /** - * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from - * a URL. - * + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * * @param containerName The container name. * @param blob The blob name. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. - * @param contentLength The length of the request. - * @param sourceUrl Specify a URL to the copy source. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * @param blocks Blob Blocks. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - String sourceUrl, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - final String comp = "block"; + public Mono> commitBlockListWithResponseAsync( + String containerName, String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + final String comp = "blocklist"; final String accept = "application/xml"; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; String encryptionKeyInternal = null; if (cpkInfo != null) { encryptionKeyInternal = cpkInfo.getEncryptionKey(); @@ -4753,102 +4839,110 @@ public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.stageBlockFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context)); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.commitBlockList(this.client.getUrl(), containerName, blob, comp, + timeout, cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, + transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, + context)); } /** - * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from - * a URL. - * + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * * @param containerName The container name. * @param blob The blob name. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less - * than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid - * parameter must be the same size for each block. - * @param contentLength The length of the request. - * @param sourceUrl Specify a URL to the copy source. - * @param sourceRange Bytes of source data in the specified range. - * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. - * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * @param blocks Blob Blocks. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. - * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. - * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. - * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String blockId, - long contentLength, - String sourceUrl, - String sourceRange, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - final String comp = "block"; + public Mono> commitBlockListWithResponseAsync( + String containerName, String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "blocklist"; final String accept = "application/xml"; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; String encryptionKeyInternal = null; if (cpkInfo != null) { encryptionKeyInternal = cpkInfo.getEncryptionKey(); @@ -4869,38 +4963,22 @@ public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - blockId, - contentLength, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - timeout, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.commitBlockList(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + contentType, contentEncoding, contentLanguage, contentMd5Converted, transactionalContentMD5Converted, + transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, + context); } /** @@ -4910,32 +4988,32 @@ public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync( * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -4946,32 +5024,133 @@ public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> commitBlockListWithResponseAsync( - String containerName, - String blob, - BlockLookupList blocks, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono commitBlockListAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId, + AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return commitBlockListWithResponseAsync(containerName, blob, blocks, timeout, transactionalContentMD5, + transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, + blobHttpHeaders, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono commitBlockListAsync(String containerName, String blob, BlockLookupList blocks, Integer timeout, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId, + AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return commitBlockListWithResponseAsync(containerName, blob, blocks, timeout, transactionalContentMD5, + transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, + blobHttpHeaders, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> commitBlockListNoCustomHeadersWithResponseAsync(String containerName, String blob, + BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "blocklist"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -5027,49 +5206,19 @@ public Mono> commitBlockLis String contentMd5Converted = Base64Util.encodeToString(contentMd5); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.commitBlockList( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - blocks, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.commitBlockListNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, timeout, cacheControl, contentType, contentEncoding, contentLanguage, + contentMd5Converted, transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, + leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, blocks, accept, context)); } /** @@ -5079,32 +5228,32 @@ public Mono> commitBlockLis * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -5116,33 +5265,16 @@ public Mono> commitBlockLis * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> commitBlockListWithResponseAsync( - String containerName, - String blob, - BlockLookupList blocks, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> commitBlockListNoCustomHeadersWithResponseAsync(String containerName, String blob, + BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "blocklist"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -5198,142 +5330,19 @@ public Mono> commitBlockLis String contentMd5Converted = Base64Util.encodeToString(contentMd5); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.commitBlockList( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - blocks, - accept, - context); - } - - /** - * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order - * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block - * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then - * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the - * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the - * block, whichever list it may belong to. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blocks Blob Blocks. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono commitBlockListAsync( - String containerName, - String blob, - BlockLookupList blocks, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return commitBlockListWithResponseAsync( - containerName, - blob, - blocks, - timeout, - transactionalContentMD5, - transactionalContentCrc64, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.commitBlockListNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, + transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, + context); } /** @@ -5343,32 +5352,32 @@ public Mono commitBlockListAsync( * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -5380,129 +5389,16 @@ public Mono commitBlockListAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono commitBlockListAsync( - String containerName, - String blob, - BlockLookupList blocks, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return commitBlockListWithResponseAsync( - containerName, - blob, - blocks, - timeout, - transactionalContentMD5, - transactionalContentCrc64, - metadata, - leaseId, - tier, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); - } - - /** - * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order - * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block - * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then - * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the - * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the - * block, whichever list it may belong to. - * - * @param containerName The container name. - * @param blob The blob name. - * @param blocks Blob Blocks. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param tier Optional. Indicates the tier to be set on the blob. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param blobTagsString Optional. Used to set blob tags in various blob operations. - * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. - * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> commitBlockListNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - BlockLookupList blocks, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public ResponseBase commitBlockListWithResponse(String containerName, + String blob, BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Map metadata, String leaseId, AccessTier tier, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "blocklist"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -5558,49 +5454,76 @@ public Mono> commitBlockListNoCustomHeadersWithResponseAsync( String contentMd5Converted = Base64Util.encodeToString(contentMd5); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.commitBlockListNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - blocks, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.commitBlockListSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + contentType, contentEncoding, contentLanguage, contentMd5Converted, transactionalContentMD5Converted, + transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, + context); + } + + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob. In order + * to be written as part of a blob, a block must have been successfully written to the server in a prior Put Block + * operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then + * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the + * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the + * block, whichever list it may belong to. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blocks Blob Blocks. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param tier Optional. Indicates the tier to be set on the blob. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void commitBlockList(String containerName, String blob, BlockLookupList blocks, Integer timeout, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Map metadata, String leaseId, + AccessTier tier, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + commitBlockListWithResponse(containerName, blob, blocks, timeout, transactionalContentMD5, + transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, + ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, + blobHttpHeaders, cpkInfo, encryptionScopeParam, Context.NONE); } /** @@ -5610,32 +5533,32 @@ public Mono> commitBlockListNoCustomHeadersWithResponseAsync( * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param tier Optional. Indicates the tier to be set on the blob. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -5647,33 +5570,16 @@ public Mono> commitBlockListNoCustomHeadersWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> commitBlockListNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - BlockLookupList blocks, - Integer timeout, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Map metadata, - String leaseId, - AccessTier tier, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Response commitBlockListNoCustomHeadersWithResponse(String containerName, String blob, + BlockLookupList blocks, Integer timeout, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Map metadata, String leaseId, AccessTier tier, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "blocklist"; final String accept = "application/xml"; String cacheControlInternal = null; @@ -5729,67 +5635,39 @@ public Mono> commitBlockListNoCustomHeadersWithResponseAsync( String contentMd5Converted = Base64Util.encodeToString(contentMd5); String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.commitBlockListNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - cacheControl, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - tier, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - blocks, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.commitBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, + transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, + context); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. + * lists together. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5797,52 +5675,32 @@ public Mono> commitBlockListNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBlockListWithResponseAsync( - String containerName, - String blob, - BlockListType listType, - String snapshot, - Integer timeout, - String leaseId, - String ifTags, - String requestId) { + String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, + String ifTags, String requestId) { final String comp = "blocklist"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getBlockList( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - listType, - timeout, - leaseId, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getBlockList(this.client.getUrl(), containerName, blob, comp, + snapshot, listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. + * lists together. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5851,89 +5709,62 @@ public Mono> getBlockList */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getBlockListWithResponseAsync( - String containerName, - String blob, - BlockListType listType, - String snapshot, - Integer timeout, - String leaseId, - String ifTags, - String requestId, - Context context) { + String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, + String ifTags, String requestId, Context context) { final String comp = "blocklist"; final String accept = "application/xml"; - return service.getBlockList( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - listType, - timeout, - leaseId, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + return service.getBlockList(this.client.getUrl(), containerName, blob, comp, snapshot, listType, timeout, + leaseId, ifTags, this.client.getVersion(), requestId, accept, context); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. + * lists together. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getBlockListAsync( - String containerName, - String blob, - BlockListType listType, - String snapshot, - Integer timeout, - String leaseId, - String ifTags, - String requestId) { - return getBlockListWithResponseAsync( - containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getBlockListAsync(String containerName, String blob, BlockListType listType, String snapshot, + Integer timeout, String leaseId, String ifTags, String requestId) { + return getBlockListWithResponseAsync(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, + requestId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. + * lists together. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5941,92 +5772,63 @@ public Mono getBlockListAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getBlockListAsync( - String containerName, - String blob, - BlockListType listType, - String snapshot, - Integer timeout, - String leaseId, - String ifTags, - String requestId, - Context context) { - return getBlockListWithResponseAsync( - containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getBlockListAsync(String containerName, String blob, BlockListType listType, String snapshot, + Integer timeout, String leaseId, String ifTags, String requestId, Context context) { + return getBlockListWithResponseAsync(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, + requestId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. + * lists together. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getBlockListNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - BlockListType listType, - String snapshot, - Integer timeout, - String leaseId, - String ifTags, - String requestId) { + public Mono> getBlockListNoCustomHeadersWithResponseAsync(String containerName, String blob, + BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId) { final String comp = "blocklist"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getBlockListNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - listType, - timeout, - leaseId, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil + .withContext(context -> service.getBlockListNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, + snapshot, listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context)); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both - * lists together. + * lists together. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -6034,31 +5836,110 @@ public Mono> getBlockListNoCustomHeadersWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getBlockListNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - BlockListType listType, - String snapshot, - Integer timeout, - String leaseId, - String ifTags, - String requestId, - Context context) { + public Mono> getBlockListNoCustomHeadersWithResponseAsync(String containerName, String blob, + BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, + Context context) { + final String comp = "blocklist"; + final String accept = "application/xml"; + return service.getBlockListNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, listType, + timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getBlockListWithResponse(String containerName, + String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, + String requestId, Context context) { + final String comp = "blocklist"; + final String accept = "application/xml"; + return service.getBlockListSync(this.client.getUrl(), containerName, blob, comp, snapshot, listType, timeout, + leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot, + Integer timeout, String leaseId, String ifTags, String requestId) { + return getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId, + Context.NONE).getValue(); + } + + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBlockListNoCustomHeadersWithResponse(String containerName, String blob, + BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId, + Context context) { final String comp = "blocklist"; final String accept = "application/xml"; - return service.getBlockListNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - listType, - timeout, - leaseId, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + return service.getBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index ea2cf43655226..6c785cc8d9205 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -27,6 +27,7 @@ import com.azure.core.util.Context; import com.azure.core.util.DateTimeRfc1123; import com.azure.core.util.FluxUtil; +import com.azure.storage.blob.implementation.models.BlobSignedIdentifierWrapper; import com.azure.storage.blob.implementation.models.ContainersAcquireLeaseHeaders; import com.azure.storage.blob.implementation.models.ContainersBreakLeaseHeaders; import com.azure.storage.blob.implementation.models.ContainersChangeLeaseHeaders; @@ -54,6 +55,7 @@ import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.ListBlobsIncludeItem; import com.azure.storage.blob.models.PublicAccessType; +import java.io.InputStream; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.List; @@ -63,22 +65,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in Containers. */ +/** + * An instance of this class provides access to all the operations defined in Containers. + */ public final class ContainersImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureBlobStorageImpl client; /** * Initializes an instance of ContainersImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainersImpl(AzureBlobStorageImpl client) { - this.service = - RestProxy.create(ContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -90,674 +98,855 @@ public final class ContainersImpl { @ServiceInterface(name = "AzureBlobStorageCont") public interface ContainersService { @Put("/{containerName}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> create(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("x-ms-default-encryption-scope") String defaultEncryptionScope, + @HeaderParam("x-ms-deny-encryption-scope-override") Boolean encryptionScopeOverridePrevented, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> createNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("x-ms-default-encryption-scope") String defaultEncryptionScope, + @HeaderParam("x-ms-deny-encryption-scope-override") Boolean encryptionScopeOverridePrevented, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> create( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @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, - @HeaderParam("x-ms-default-encryption-scope") String defaultEncryptionScope, - @HeaderParam("x-ms-deny-encryption-scope-override") Boolean encryptionScopeOverridePrevented, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase createSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("x-ms-default-encryption-scope") String defaultEncryptionScope, + @HeaderParam("x-ms-deny-encryption-scope-override") Boolean encryptionScopeOverridePrevented, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response createNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("x-ms-default-encryption-scope") String defaultEncryptionScope, + @HeaderParam("x-ms-deny-encryption-scope-override") Boolean encryptionScopeOverridePrevented, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getProperties(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> createNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @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, - @HeaderParam("x-ms-default-encryption-scope") String defaultEncryptionScope, - @HeaderParam("x-ms-deny-encryption-scope-override") Boolean encryptionScopeOverridePrevented, - @HeaderParam("Accept") String accept, - Context context); + Mono> getPropertiesNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getProperties( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @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, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getPropertiesSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getPropertiesNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @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, - @HeaderParam("Accept") String accept, - Context context); + Response getPropertiesNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @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, + @HeaderParam("Accept") String accept, Context context); @Delete("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> delete( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> delete(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Delete("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> deleteNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> deleteNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/{containerName}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase deleteSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Delete("/{containerName}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response deleteNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setMetadata(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setMetadataNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setMetadata( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase setMetadataSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response setMetadataNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-meta-") Map metadata, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getAccessPolicy( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @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, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setMetadataNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> getAccessPolicyNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @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, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> getAccessPolicy( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @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, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getAccessPolicySync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @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, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response getAccessPolicyNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @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, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setAccessPolicy(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-public-access") PublicAccessType access, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobSignedIdentifierWrapper containerAcl, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> setAccessPolicyNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-public-access") PublicAccessType access, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobSignedIdentifierWrapper containerAcl, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase setAccessPolicySync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-public-access") PublicAccessType access, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobSignedIdentifierWrapper containerAcl, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response setAccessPolicyNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-public-access") PublicAccessType access, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobSignedIdentifierWrapper containerAcl, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> restore(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-deleted-container-name") String deletedContainerName, + @HeaderParam("x-ms-deleted-container-version") String deletedContainerVersion, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> getAccessPolicyNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> restoreNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-deleted-container-name") String deletedContainerName, + @HeaderParam("x-ms-deleted-container-version") String deletedContainerVersion, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setAccessPolicy( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-public-access") PublicAccessType access, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") SignedIdentifiersWrapper containerAcl, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase restoreSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-deleted-container-name") String deletedContainerName, + @HeaderParam("x-ms-deleted-container-version") String deletedContainerVersion, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setAccessPolicyNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-public-access") PublicAccessType access, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") SignedIdentifiersWrapper containerAcl, - @HeaderParam("Accept") String accept, - Context context); + Response restoreNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-deleted-container-name") String deletedContainerName, + @HeaderParam("x-ms-deleted-container-version") String deletedContainerVersion, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({201}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> restore( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-deleted-container-name") String deletedContainerName, - @HeaderParam("x-ms-deleted-container-version") String deletedContainerVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> rename(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, + @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}") - @ExpectedResponses({201}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> restoreNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-deleted-container-name") String deletedContainerName, - @HeaderParam("x-ms-deleted-container-version") String deletedContainerVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> renameNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, + @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> rename( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-container-name") String sourceContainerName, - @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase renameSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, + @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response renameNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, + @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, @HeaderParam("Accept") String accept, + Context context); + + @Post("/{containerName}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono>> submitBatch(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") Flux body, @HeaderParam("Accept") String accept, Context context); + + @Post("/{containerName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> renameNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-source-container-name") String sourceContainerName, - @HeaderParam("x-ms-source-lease-id") String sourceLeaseId, - @HeaderParam("Accept") String accept, - Context context); + Mono submitBatchNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") Flux body, @HeaderParam("Accept") String accept, Context context); @Post("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> submitBatch( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono>> submitBatch(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, Context context); @Post("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono submitBatchNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono submitBatchNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, Context context); @Post("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> submitBatch( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase submitBatchSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, Context context); @Post("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response submitBatchNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> filterBlobs(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono submitBatchNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Mono> filterBlobsNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> filterBlobs( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("where") String where, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase filterBlobsSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> filterBlobsNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("where") String where, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, - @HeaderParam("Accept") String accept, - Context context); + Response filterBlobsNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> acquireLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-duration") Integer duration, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> acquireLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> acquireLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-duration") Integer duration, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> acquireLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> releaseLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase acquireLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> releaseLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response acquireLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-duration") Integer duration, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> renewLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> releaseLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> renewLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> releaseLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> breakLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase releaseLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({202}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> breakLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response releaseLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> changeLease( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> renewLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> changeLeaseNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("comp") String comp, - @QueryParam("restype") String restype, - @HeaderParam("x-ms-lease-action") String action, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, - @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> renewLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase renewLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response renewLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> breakLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> breakLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase breakLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response breakLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-break-period") Integer breakPeriod, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> changeLease(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> changeLeaseNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase changeLeaseSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response changeLeaseNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("comp") String comp, + @QueryParam("restype") String restype, @HeaderParam("x-ms-lease-action") String action, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("If-Modified-Since") DateTimeRfc1123 ifModifiedSince, + @HeaderParam("If-Unmodified-Since") DateTimeRfc1123 ifUnmodifiedSince, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> listBlobFlatSegment( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @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, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, @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, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> listBlobFlatSegmentNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @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, @HeaderParam("Accept") String accept, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase listBlobFlatSegmentSync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, @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, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> listBlobFlatSegmentNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @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, - @HeaderParam("Accept") String accept, - Context context); + Response listBlobFlatSegmentNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @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, @HeaderParam("Accept") String accept, + Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> - listBlobHierarchySegment( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @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, - @HeaderParam("Accept") String accept, - Context context); + listBlobHierarchySegment(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @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, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> listBlobHierarchySegmentNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @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, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, @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, @HeaderParam("Accept") String accept, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase + listBlobHierarchySegmentSync(@HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @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, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response listBlobHierarchySegmentNoCustomHeadersSync( + @HostParam("url") String url, @PathParam("containerName") String containerName, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, @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, @HeaderParam("Accept") String accept, + Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getAccountInfo(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getAccountInfoNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getAccountInfo( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getAccountInfoSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getAccountInfoNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response getAccountInfoNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @QueryParam("restype") String restype, + @QueryParam("comp") String comp, @HeaderParam("x-ms-version") String version, + @HeaderParam("Accept") String accept, Context context); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobContainerEncryptionScope Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -765,13 +954,9 @@ Mono> getAccountInfoNoCustomHeaders( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String containerName, - Integer timeout, - Map metadata, - PublicAccessType access, - String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope) { + public Mono> createWithResponseAsync(String containerName, + Integer timeout, Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope) { final String restype = "container"; final String accept = "application/xml"; String defaultEncryptionScopeInternal = null; @@ -781,44 +966,32 @@ public Mono> createWithResponseAsync String defaultEncryptionScope = defaultEncryptionScopeInternal; Boolean encryptionScopeOverridePreventedInternal = null; if (blobContainerEncryptionScope != null) { - encryptionScopeOverridePreventedInternal = - blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + encryptionScopeOverridePreventedInternal + = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); } Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return FluxUtil.withContext( - context -> - service.create( - this.client.getUrl(), - containerName, - restype, - timeout, - metadata, - access, - this.client.getVersion(), - requestId, - defaultEncryptionScope, - encryptionScopeOverridePrevented, - accept, - context)); + return FluxUtil.withContext(context -> service.create(this.client.getUrl(), containerName, restype, timeout, + metadata, access, this.client.getVersion(), requestId, defaultEncryptionScope, + encryptionScopeOverridePrevented, accept, context)); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobContainerEncryptionScope Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -827,14 +1000,9 @@ public Mono> createWithResponseAsync * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String containerName, - Integer timeout, - Map metadata, - PublicAccessType access, - String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, - Context context) { + public Mono> createWithResponseAsync(String containerName, + Integer timeout, Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { final String restype = "container"; final String accept = "application/xml"; String defaultEncryptionScopeInternal = null; @@ -844,42 +1012,32 @@ public Mono> createWithResponseAsync String defaultEncryptionScope = defaultEncryptionScopeInternal; Boolean encryptionScopeOverridePreventedInternal = null; if (blobContainerEncryptionScope != null) { - encryptionScopeOverridePreventedInternal = - blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + encryptionScopeOverridePreventedInternal + = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); } Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return service.create( - this.client.getUrl(), - containerName, - restype, - timeout, - metadata, - access, - this.client.getVersion(), - requestId, - defaultEncryptionScope, - encryptionScopeOverridePrevented, - accept, - context); + return service.create(this.client.getUrl(), containerName, restype, timeout, metadata, access, + this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, + context); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobContainerEncryptionScope Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -887,35 +1045,29 @@ public Mono> createWithResponseAsync * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String containerName, - Integer timeout, - Map metadata, - PublicAccessType access, - String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope) { - return createWithResponseAsync( - containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope) - .flatMap(ignored -> Mono.empty()); + public Mono createAsync(String containerName, Integer timeout, Map metadata, + PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) { + return createWithResponseAsync(containerName, timeout, metadata, access, requestId, + blobContainerEncryptionScope).flatMap(ignored -> Mono.empty()); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobContainerEncryptionScope Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -924,36 +1076,30 @@ public Mono createAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String containerName, - Integer timeout, - Map metadata, - PublicAccessType access, - String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, - Context context) { - return createWithResponseAsync( - containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope, context) - .flatMap(ignored -> Mono.empty()); + public Mono createAsync(String containerName, Integer timeout, Map metadata, + PublicAccessType access, String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope, + Context context) { + return createWithResponseAsync(containerName, timeout, metadata, access, requestId, + blobContainerEncryptionScope, context).flatMap(ignored -> Mono.empty()); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobContainerEncryptionScope Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -961,13 +1107,9 @@ public Mono createAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - Map metadata, - PublicAccessType access, - String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope) { + public Mono> createNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope) { final String restype = "container"; final String accept = "application/xml"; String defaultEncryptionScopeInternal = null; @@ -977,44 +1119,32 @@ public Mono> createNoCustomHeadersWithResponseAsync( String defaultEncryptionScope = defaultEncryptionScopeInternal; Boolean encryptionScopeOverridePreventedInternal = null; if (blobContainerEncryptionScope != null) { - encryptionScopeOverridePreventedInternal = - blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + encryptionScopeOverridePreventedInternal + = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); } Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return FluxUtil.withContext( - context -> - service.createNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - timeout, - metadata, - access, - this.client.getVersion(), - requestId, - defaultEncryptionScope, - encryptionScopeOverridePrevented, - accept, - context)); + return FluxUtil.withContext(context -> service.createNoCustomHeaders(this.client.getUrl(), containerName, + restype, timeout, metadata, access, this.client.getVersion(), requestId, defaultEncryptionScope, + encryptionScopeOverridePrevented, accept, context)); } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobContainerEncryptionScope Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1023,14 +1153,130 @@ public Mono> createNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - Map metadata, - PublicAccessType access, - String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, - Context context) { + public Mono> createNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + String defaultEncryptionScopeInternal = null; + if (blobContainerEncryptionScope != null) { + defaultEncryptionScopeInternal = blobContainerEncryptionScope.getDefaultEncryptionScope(); + } + String defaultEncryptionScope = defaultEncryptionScopeInternal; + Boolean encryptionScopeOverridePreventedInternal = null; + if (blobContainerEncryptionScope != null) { + encryptionScopeOverridePreventedInternal + = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + } + Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; + return service.createNoCustomHeaders(this.client.getUrl(), containerName, restype, timeout, metadata, access, + this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, + context); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createWithResponse(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + String defaultEncryptionScopeInternal = null; + if (blobContainerEncryptionScope != null) { + defaultEncryptionScopeInternal = blobContainerEncryptionScope.getDefaultEncryptionScope(); + } + String defaultEncryptionScope = defaultEncryptionScopeInternal; + Boolean encryptionScopeOverridePreventedInternal = null; + if (blobContainerEncryptionScope != null) { + encryptionScopeOverridePreventedInternal + = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + } + Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; + return service.createSync(this.client.getUrl(), containerName, restype, timeout, metadata, access, + this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, + context); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(String containerName, Integer timeout, Map metadata, PublicAccessType access, + String requestId, BlobContainerEncryptionScope blobContainerEncryptionScope) { + createWithResponse(containerName, timeout, metadata, access, requestId, blobContainerEncryptionScope, + Context.NONE); + } + + /** + * creates a new container under the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobContainerEncryptionScope Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createNoCustomHeadersWithResponse(String containerName, Integer timeout, + Map metadata, PublicAccessType access, String requestId, + BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { final String restype = "container"; final String accept = "application/xml"; String defaultEncryptionScopeInternal = null; @@ -1040,71 +1286,51 @@ public Mono> createNoCustomHeadersWithResponseAsync( String defaultEncryptionScope = defaultEncryptionScopeInternal; Boolean encryptionScopeOverridePreventedInternal = null; if (blobContainerEncryptionScope != null) { - encryptionScopeOverridePreventedInternal = - blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + encryptionScopeOverridePreventedInternal + = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); } Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return service.createNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - timeout, - metadata, - access, - this.client.getVersion(), - requestId, - defaultEncryptionScope, - encryptionScopeOverridePrevented, - accept, - context); + return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, metadata, + access, this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, + accept, context); } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId) { + public Mono> getPropertiesWithResponseAsync(String containerName, + Integer timeout, String leaseId, String requestId) { final String restype = "container"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getProperties( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getProperties(this.client.getUrl(), containerName, restype, + timeout, leaseId, this.client.getVersion(), requestId, accept, context)); } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1112,33 +1338,25 @@ public Mono> getPropertiesWit * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { + public Mono> getPropertiesWithResponseAsync(String containerName, + Integer timeout, String leaseId, String requestId, Context context) { final String restype = "container"; final String accept = "application/xml"; - return service.getProperties( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + return service.getProperties(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1147,20 +1365,20 @@ public Mono> getPropertiesWit @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesAsync(String containerName, Integer timeout, String leaseId, String requestId) { return getPropertiesWithResponseAsync(containerName, timeout, leaseId, requestId) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1168,58 +1386,48 @@ public Mono getPropertiesAsync(String containerName, Integer timeout, Stri * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { + public Mono getPropertiesAsync(String containerName, Integer timeout, String leaseId, String requestId, + Context context) { return getPropertiesWithResponseAsync(containerName, timeout, leaseId, requestId, context) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesNoCustomHeadersWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId) { + public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, String requestId) { final String restype = "container"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getPropertiesNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, + restype, timeout, leaseId, this.client.getVersion(), requestId, accept, context)); } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1227,87 +1435,136 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesNoCustomHeadersWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { + public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, String requestId, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + return service.getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(String containerName, + Integer timeout, String leaseId, String requestId, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + return service.getPropertiesSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties(String containerName, Integer timeout, String leaseId, String requestId) { + getPropertiesWithResponse(containerName, timeout, leaseId, requestId, Context.NONE); + } + + /** + * returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesNoCustomHeadersWithResponse(String containerName, Integer timeout, + String leaseId, String requestId, Context context) { final String restype = "container"; final String accept = "application/xml"; - return service.getPropertiesNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> deleteWithResponseAsync(String containerName, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId) { final String restype = "container"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.delete( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.delete(this.client.getUrl(), containerName, restype, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + context)); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1315,81 +1572,61 @@ public Mono> deleteWithResponseAsync * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> deleteWithResponseAsync(String containerName, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { final String restype = "container"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.delete( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.delete(this.client.getUrl(), containerName, restype, timeout, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String containerName, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono deleteAsync(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { return deleteWithResponseAsync(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1397,84 +1634,61 @@ public Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String containerName, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - return deleteWithResponseAsync( - containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId, context) - .flatMap(ignored -> Mono.empty()); + public Mono deleteAsync(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return deleteWithResponseAsync(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId, + context).flatMap(ignored -> Mono.empty()); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> deleteNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { final String restype = "container"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.deleteNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.deleteNoCustomHeaders(this.client.getUrl(), containerName, + restype, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context)); } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1482,105 +1696,169 @@ public Mono> deleteNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> deleteNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { final String restype = "container"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteNoCustomHeaders(this.client.getUrl(), containerName, restype, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** - * operation sets one or more user-defined name-value pairs for the specified container. - * + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - Map metadata, - OffsetDateTime ifModifiedSince, - String requestId) { + public ResponseBase deleteWithResponse(String containerName, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { final String restype = "container"; - final String comp = "metadata"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return FluxUtil.withContext( - context -> - service.setMetadata( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - metadata, - ifModifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** - * operation sets one or more user-defined name-value pairs for the specified container. - * + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + deleteWithResponse(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId, + Context.NONE); + } + + /** + * operation marks the specified container for deletion. The container and any blobs contained within it are later + * deleted during garbage collection. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + final String restype = "container"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataWithResponseAsync(String containerName, + Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, + String requestId) { + final String restype = "container"; + final String comp = "metadata"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + return FluxUtil + .withContext(context -> service.setMetadata(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context)); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1588,87 +1866,66 @@ public Mono> setMetadataWithRes * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - Map metadata, - OffsetDateTime ifModifiedSince, - String requestId, - Context context) { + public Mono> setMetadataWithResponseAsync(String containerName, + Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, + Context context) { final String restype = "container"; final String comp = "metadata"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadata( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - metadata, - ifModifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + return service.setMetadata(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, metadata, + ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataAsync( - String containerName, - Integer timeout, - String leaseId, - Map metadata, - OffsetDateTime ifModifiedSince, - String requestId) { + public Mono setMetadataAsync(String containerName, Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, String requestId) { return setMetadataWithResponseAsync(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1676,90 +1933,66 @@ public Mono setMetadataAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setMetadataAsync( - String containerName, - Integer timeout, - String leaseId, - Map metadata, - OffsetDateTime ifModifiedSince, - String requestId, - Context context) { - return setMetadataWithResponseAsync( - containerName, timeout, leaseId, metadata, ifModifiedSince, requestId, context) - .flatMap(ignored -> Mono.empty()); + public Mono setMetadataAsync(String containerName, Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, String requestId, Context context) { + return setMetadataWithResponseAsync(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId, + context).flatMap(ignored -> Mono.empty()); } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - Map metadata, - OffsetDateTime ifModifiedSince, - String requestId) { + public Mono> setMetadataNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId) { final String restype = "container"; final String comp = "metadata"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); return FluxUtil.withContext( - context -> - service.setMetadataNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - metadata, - ifModifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + context -> service.setMetadataNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context)); } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1767,144 +2000,209 @@ public Mono> setMetadataNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setMetadataNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - Map metadata, - OffsetDateTime ifModifiedSince, - String requestId, - Context context) { + public Mono> setMetadataNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, + Context context) { + final String restype = "container"; + final String comp = "metadata"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + return service.setMetadataNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, + metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setMetadataWithResponse(String containerName, + Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, + Context context) { + final String restype = "container"; + final String comp = "metadata"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + return service.setMetadataSync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, metadata, + ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata(String containerName, Integer timeout, String leaseId, Map metadata, + OffsetDateTime ifModifiedSince, String requestId) { + setMetadataWithResponse(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId, Context.NONE); + } + + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setMetadataNoCustomHeadersWithResponse(String containerName, Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, String requestId, Context context) { final String restype = "container"; final String comp = "metadata"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadataNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - metadata, - ifModifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the permissions for the specified container along with {@link ResponseBase} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - getAccessPolicyWithResponseAsync(String containerName, Integer timeout, String leaseId, String requestId) { + public Mono> + getAccessPolicyWithResponseAsync(String containerName, Integer timeout, String leaseId, String requestId) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccessPolicy( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getAccessPolicy(this.client.getUrl(), containerName, restype, + comp, timeout, leaseId, this.client.getVersion(), requestId, accept, context)); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the permissions for the specified container along with {@link ResponseBase} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - getAccessPolicyWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { + public Mono> + getAccessPolicyWithResponseAsync(String containerName, Integer timeout, String leaseId, String requestId, + Context context) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - return service.getAccessPolicy( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + return service.getAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the permissions for the specified container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccessPolicyAsync( - String containerName, Integer timeout, String leaseId, String requestId) { + public Mono getAccessPolicyAsync(String containerName, Integer timeout, String leaseId, + String requestId) { return getAccessPolicyWithResponseAsync(containerName, timeout, leaseId, requestId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1912,103 +2210,159 @@ public Mono> getAccessPolicyAsync( * @return the permissions for the specified container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccessPolicyAsync( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { + public Mono getAccessPolicyAsync(String containerName, Integer timeout, String leaseId, + String requestId, Context context) { return getAccessPolicyWithResponseAsync(containerName, timeout, leaseId, requestId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the permissions for the specified container along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> getAccessPolicyNoCustomHeadersWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId) { + public Mono> getAccessPolicyNoCustomHeadersWithResponseAsync( + String containerName, Integer timeout, String leaseId, String requestId) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccessPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getAccessPolicyNoCustomHeaders(this.client.getUrl(), + containerName, restype, comp, timeout, leaseId, this.client.getVersion(), requestId, accept, context)); } /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the permissions for the specified container along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccessPolicyNoCustomHeadersWithResponseAsync( + String containerName, Integer timeout, String leaseId, String requestId, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + return service.getAccessPolicyNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, this.client.getVersion(), requestId, accept, context); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the permissions for the specified container along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getAccessPolicyWithResponse( + String containerName, Integer timeout, String leaseId, String requestId, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + return service.getAccessPolicySync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the permissions for the specified container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobSignedIdentifierWrapper getAccessPolicy(String containerName, Integer timeout, String leaseId, + String requestId) { + return getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, Context.NONE).getValue(); + } + + /** + * gets the permissions for the specified container. The permissions indicate whether container data may be accessed + * publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the permissions for the specified container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> getAccessPolicyNoCustomHeadersWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId, Context context) { + public Response getAccessPolicyNoCustomHeadersWithResponse(String containerName, + Integer timeout, String leaseId, String requestId, Context context) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - return service.getAccessPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - this.client.getVersion(), - requestId, - accept, - context); + return service.getAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, this.client.getVersion(), requestId, accept, context); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param containerAcl the acls for the container. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2017,57 +2371,37 @@ public Mono>> getAccessPolicyNoCustomHeaders */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setAccessPolicyWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - PublicAccessType access, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - List containerAcl) { + String containerName, Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl); - return FluxUtil.withContext( - context -> - service.setAccessPolicy( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - access, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - containerAclConverted, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return FluxUtil.withContext(context -> service.setAccessPolicy(this.client.getUrl(), containerName, restype, + comp, timeout, leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, containerAclConverted, accept, context)); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param containerAcl the acls for the container. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2077,56 +2411,37 @@ public Mono> setAccessPolic */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setAccessPolicyWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - PublicAccessType access, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - List containerAcl, - Context context) { + String containerName, Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl, Context context) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl); - return service.setAccessPolicy( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - access, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - containerAclConverted, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return service.setAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + containerAclConverted, accept, context); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param containerAcl the acls for the container. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2134,43 +2449,29 @@ public Mono> setAccessPolic * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessPolicyAsync( - String containerName, - Integer timeout, - String leaseId, - PublicAccessType access, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - List containerAcl) { - return setAccessPolicyWithResponseAsync( - containerName, - timeout, - leaseId, - access, - ifModifiedSince, - ifUnmodifiedSince, - requestId, - containerAcl) - .flatMap(ignored -> Mono.empty()); + public Mono setAccessPolicyAsync(String containerName, Integer timeout, String leaseId, + PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + List containerAcl) { + return setAccessPolicyWithResponseAsync(containerName, timeout, leaseId, access, ifModifiedSince, + ifUnmodifiedSince, requestId, containerAcl).flatMap(ignored -> Mono.empty()); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param containerAcl the acls for the container. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2179,45 +2480,29 @@ public Mono setAccessPolicyAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessPolicyAsync( - String containerName, - Integer timeout, - String leaseId, - PublicAccessType access, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - List containerAcl, - Context context) { - return setAccessPolicyWithResponseAsync( - containerName, - timeout, - leaseId, - access, - ifModifiedSince, - ifUnmodifiedSince, - requestId, - containerAcl, - context) - .flatMap(ignored -> Mono.empty()); + public Mono setAccessPolicyAsync(String containerName, Integer timeout, String leaseId, + PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + List containerAcl, Context context) { + return setAccessPolicyWithResponseAsync(containerName, timeout, leaseId, access, ifModifiedSince, + ifUnmodifiedSince, requestId, containerAcl, context).flatMap(ignored -> Mono.empty()); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param containerAcl the acls for the container. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2225,58 +2510,38 @@ public Mono setAccessPolicyAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setAccessPolicyNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - PublicAccessType access, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - List containerAcl) { + public Mono> setAccessPolicyNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, List containerAcl) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl); - return FluxUtil.withContext( - context -> - service.setAccessPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - access, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - containerAclConverted, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return FluxUtil.withContext(context -> service.setAccessPolicyNoCustomHeaders(this.client.getUrl(), + containerName, restype, comp, timeout, leaseId, access, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, containerAclConverted, accept, context)); } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param access Specifies whether data in the container may be accessed publicly and the level of access. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param containerAcl the acls for the container. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2285,98 +2550,173 @@ public Mono> setAccessPolicyNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setAccessPolicyNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String leaseId, - PublicAccessType access, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - List containerAcl, - Context context) { + public Mono> setAccessPolicyNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, List containerAcl, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return service.setAccessPolicyNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + containerAclConverted, accept, context); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setAccessPolicyWithResponse(String containerName, + Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl, Context context) { + final String restype = "container"; + final String comp = "acl"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return service.setAccessPolicySync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + containerAclConverted, accept, context); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setAccessPolicy(String containerName, Integer timeout, String leaseId, PublicAccessType access, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + List containerAcl) { + setAccessPolicyWithResponse(containerName, timeout, leaseId, access, ifModifiedSince, ifUnmodifiedSince, + requestId, containerAcl, Context.NONE); + } + + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be + * accessed publicly. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access Specifies whether data in the container may be accessed publicly and the level of access. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param containerAcl the acls for the container. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setAccessPolicyNoCustomHeadersWithResponse(String containerName, Integer timeout, + String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, List containerAcl, Context context) { final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - SignedIdentifiersWrapper containerAclConverted = new SignedIdentifiersWrapper(containerAcl); - return service.setAccessPolicyNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - leaseId, - access, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - containerAclConverted, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); + return service.setAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + containerAclConverted, accept, context); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. + * to restore. * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. + * container to restore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> restoreWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String deletedContainerName, - String deletedContainerVersion) { + public Mono> restoreWithResponseAsync(String containerName, + Integer timeout, String requestId, String deletedContainerName, String deletedContainerVersion) { final String restype = "container"; final String comp = "undelete"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.restore( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - deletedContainerName, - deletedContainerVersion, - accept, - context)); + return FluxUtil + .withContext(context -> service.restore(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context)); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. + * to restore. * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. + * container to restore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2384,73 +2724,54 @@ public Mono> restoreWithResponseAsy * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> restoreWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String deletedContainerName, - String deletedContainerVersion, - Context context) { + public Mono> restoreWithResponseAsync(String containerName, + Integer timeout, String requestId, String deletedContainerName, String deletedContainerVersion, + Context context) { final String restype = "container"; final String comp = "undelete"; final String accept = "application/xml"; - return service.restore( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - deletedContainerName, - deletedContainerVersion, - accept, - context); + return service.restore(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), + requestId, deletedContainerName, deletedContainerVersion, accept, context); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. + * to restore. * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. + * container to restore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono restoreAsync( - String containerName, - Integer timeout, - String requestId, - String deletedContainerName, - String deletedContainerVersion) { - return restoreWithResponseAsync( - containerName, timeout, requestId, deletedContainerName, deletedContainerVersion) - .flatMap(ignored -> Mono.empty()); + public Mono restoreAsync(String containerName, Integer timeout, String requestId, String deletedContainerName, + String deletedContainerVersion) { + return restoreWithResponseAsync(containerName, timeout, requestId, deletedContainerName, + deletedContainerVersion).flatMap(ignored -> Mono.empty()); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. + * to restore. * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. + * container to restore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2458,75 +2779,54 @@ public Mono restoreAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono restoreAsync( - String containerName, - Integer timeout, - String requestId, - String deletedContainerName, - String deletedContainerVersion, - Context context) { - return restoreWithResponseAsync( - containerName, timeout, requestId, deletedContainerName, deletedContainerVersion, context) - .flatMap(ignored -> Mono.empty()); + public Mono restoreAsync(String containerName, Integer timeout, String requestId, String deletedContainerName, + String deletedContainerVersion, Context context) { + return restoreWithResponseAsync(containerName, timeout, requestId, deletedContainerName, + deletedContainerVersion, context).flatMap(ignored -> Mono.empty()); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. + * to restore. * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. + * container to restore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> restoreNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String deletedContainerName, - String deletedContainerVersion) { + public Mono> restoreNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String requestId, String deletedContainerName, String deletedContainerVersion) { final String restype = "container"; final String comp = "undelete"; final String accept = "application/xml"; return FluxUtil.withContext( - context -> - service.restoreNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - deletedContainerName, - deletedContainerVersion, - accept, - context)); + context -> service.restoreNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context)); } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container - * to restore. + * to restore. * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted - * container to restore. + * container to restore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2534,148 +2834,188 @@ public Mono> restoreNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> restoreNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String deletedContainerName, - String deletedContainerVersion, - Context context) { + public Mono> restoreNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + String requestId, String deletedContainerName, String deletedContainerVersion, Context context) { final String restype = "container"; final String comp = "undelete"; final String accept = "application/xml"; - return service.restoreNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - deletedContainerName, - deletedContainerVersion, - accept, - context); + return service.restoreNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); } /** - * Renames an existing container. - * + * Restores a previously-deleted container. + * * @param containerName The container name. - * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. + * analytics logs when storage analytics logging is enabled. + * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container + * to restore. + * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted + * container to restore. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renameWithResponseAsync( - String containerName, String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId) { + public ResponseBase restoreWithResponse(String containerName, Integer timeout, + String requestId, String deletedContainerName, String deletedContainerVersion, Context context) { final String restype = "container"; - final String comp = "rename"; + final String comp = "undelete"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.rename( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - sourceContainerName, - sourceLeaseId, - accept, - context)); + return service.restoreSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); } /** - * Renames an existing container. - * + * Restores a previously-deleted container. + * * @param containerName The container name. - * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. + * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container + * to restore. + * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted + * container to restore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renameWithResponseAsync( - String containerName, - String sourceContainerName, - Integer timeout, - String requestId, - String sourceLeaseId, - Context context) { - final String restype = "container"; - final String comp = "rename"; - final String accept = "application/xml"; - return service.rename( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - sourceContainerName, - sourceLeaseId, - accept, - context); + public void restore(String containerName, Integer timeout, String requestId, String deletedContainerName, + String deletedContainerVersion) { + restoreWithResponse(containerName, timeout, requestId, deletedContainerName, deletedContainerVersion, + Context.NONE); + } + + /** + * Restores a previously-deleted container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param deletedContainerName Optional. Version 2019-12-12 and later. Specifies the name of the deleted container + * to restore. + * @param deletedContainerVersion Optional. Version 2019-12-12 and later. Specifies the version of the deleted + * container to restore. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response restoreNoCustomHeadersWithResponse(String containerName, Integer timeout, String requestId, + String deletedContainerName, String deletedContainerVersion, Context context) { + final String restype = "container"; + final String comp = "undelete"; + final String accept = "application/xml"; + return service.restoreNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renameWithResponseAsync(String containerName, + String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId) { + final String restype = "container"; + final String comp = "rename"; + final String accept = "application/xml"; + return FluxUtil.withContext(context -> service.rename(this.client.getUrl(), containerName, restype, comp, + timeout, this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context)); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renameWithResponseAsync(String containerName, + String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId, Context context) { + final String restype = "container"; + final String comp = "rename"; + final String accept = "application/xml"; + return service.rename(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), + requestId, sourceContainerName, sourceLeaseId, accept, context); } /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. + * the lease ID must match. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renameAsync( - String containerName, String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId) { + public Mono renameAsync(String containerName, String sourceContainerName, Integer timeout, String requestId, + String sourceLeaseId) { return renameWithResponseAsync(containerName, sourceContainerName, timeout, requestId, sourceLeaseId) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. + * the lease ID must match. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2683,68 +3023,52 @@ public Mono renameAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renameAsync( - String containerName, - String sourceContainerName, - Integer timeout, - String requestId, - String sourceLeaseId, - Context context) { + public Mono renameAsync(String containerName, String sourceContainerName, Integer timeout, String requestId, + String sourceLeaseId, Context context) { return renameWithResponseAsync(containerName, sourceContainerName, timeout, requestId, sourceLeaseId, context) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. + * the lease ID must match. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renameNoCustomHeadersWithResponseAsync( - String containerName, String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId) { + public Mono> renameNoCustomHeadersWithResponseAsync(String containerName, String sourceContainerName, + Integer timeout, String requestId, String sourceLeaseId) { final String restype = "container"; final String comp = "rename"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.renameNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - sourceContainerName, - sourceLeaseId, - accept, - context)); + return FluxUtil + .withContext(context -> service.renameNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, + timeout, this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context)); } /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and - * the lease ID must match. + * the lease ID must match. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2752,43 +3076,106 @@ public Mono> renameNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renameNoCustomHeadersWithResponseAsync( - String containerName, - String sourceContainerName, - Integer timeout, - String requestId, - String sourceLeaseId, - Context context) { + public Mono> renameNoCustomHeadersWithResponseAsync(String containerName, String sourceContainerName, + Integer timeout, String requestId, String sourceLeaseId, Context context) { + final String restype = "container"; + final String comp = "rename"; + final String accept = "application/xml"; + return service.renameNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase renameWithResponse(String containerName, + String sourceContainerName, Integer timeout, String requestId, String sourceLeaseId, Context context) { + final String restype = "container"; + final String comp = "rename"; + final String accept = "application/xml"; + return service.renameSync(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), + requestId, sourceContainerName, sourceLeaseId, accept, context); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rename(String containerName, String sourceContainerName, Integer timeout, String requestId, + String sourceLeaseId) { + renameWithResponse(containerName, sourceContainerName, timeout, requestId, sourceLeaseId, Context.NONE); + } + + /** + * Renames an existing container. + * + * @param containerName The container name. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param sourceLeaseId A lease ID for the source path. If specified, the source path must have an active lease and + * the lease ID must match. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response renameNoCustomHeadersWithResponse(String containerName, String sourceContainerName, + Integer timeout, String requestId, String sourceLeaseId, Context context) { final String restype = "container"; final String comp = "rename"; final String accept = "application/xml"; - return service.renameNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - sourceContainerName, - sourceLeaseId, - accept, - context); + return service.renameNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2796,45 +3183,28 @@ public Mono> renameNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId) { + String containerName, long contentLength, String multipartContentType, Flux body, Integer timeout, + String requestId) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatch( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatch(this.client.getUrl(), containerName, restype, comp, + contentLength, multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2843,75 +3213,53 @@ public Mono>> submit */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId, - Context context) { + String containerName, long contentLength, String multipartContentType, Flux body, Integer timeout, + String requestId, Context context) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatch( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatch(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - String containerName, - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId) { - return submitBatchWithResponseAsync( - containerName, contentLength, multipartContentType, body, timeout, requestId) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux submitBatchAsync(String containerName, long contentLength, String multipartContentType, + Flux body, Integer timeout, String requestId) { + return submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, body, timeout, + requestId).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2919,78 +3267,54 @@ public Flux submitBatchAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - String containerName, - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId, - Context context) { - return submitBatchWithResponseAsync( - containerName, contentLength, multipartContentType, body, timeout, requestId, context) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux submitBatchAsync(String containerName, long contentLength, String multipartContentType, + Flux body, Integer timeout, String requestId, Context context) { + return submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, body, timeout, + requestId, context).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(String containerName, long contentLength, + String multipartContentType, Flux body, Integer timeout, String requestId) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatchNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatchNoCustomHeaders(this.client.getUrl(), containerName, + restype, comp, contentLength, multipartContentType, timeout, this.client.getVersion(), requestId, body, + accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2998,45 +3322,28 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId, - Context context) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(String containerName, long contentLength, + String multipartContentType, Flux body, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatchNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3044,45 +3351,28 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId) { + String containerName, long contentLength, String multipartContentType, BinaryData body, Integer timeout, + String requestId) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatch( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatch(this.client.getUrl(), containerName, restype, comp, + contentLength, multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3091,75 +3381,53 @@ public Mono>> submit */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId, - Context context) { + String containerName, long contentLength, String multipartContentType, BinaryData body, Integer timeout, + String requestId, Context context) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatch( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatch(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - String containerName, - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId) { - return submitBatchWithResponseAsync( - containerName, contentLength, multipartContentType, body, timeout, requestId) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux submitBatchAsync(String containerName, long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId) { + return submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, body, timeout, + requestId).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3167,78 +3435,54 @@ public Flux submitBatchAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - String containerName, - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId, - Context context) { - return submitBatchWithResponseAsync( - containerName, contentLength, multipartContentType, body, timeout, requestId, context) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Flux submitBatchAsync(String containerName, long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId, Context context) { + return submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, body, timeout, + requestId, context).flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(String containerName, long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatchNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatchNoCustomHeaders(this.client.getUrl(), containerName, + restype, comp, contentLength, multipartContentType, timeout, this.client.getVersion(), requestId, body, + accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3246,177 +3490,210 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - String containerName, - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId, - Context context) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(String containerName, long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + final String restype = "container"; + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase submitBatchWithResponse(String containerName, + long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId, + Context context) { + final String restype = "container"; + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchSync(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream submitBatch(String containerName, long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId) { + return submitBatchWithResponse(containerName, contentLength, multipartContentType, body, timeout, requestId, + Context.NONE).getValue(); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param containerName The container name. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response submitBatchNoCustomHeadersWithResponse(String containerName, long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> filterBlobsWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include) { + String containerName, Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include) { final String restype = "container"; final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.filterBlobs( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context)); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.filterBlobs(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context)); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> filterBlobsWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include, - Context context) { + String containerName, Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include, Context context) { final String restype = "container"; final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.filterBlobs( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobs(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3424,39 +3701,33 @@ public Mono> filte * @return the result of a Filter Blobs API call on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono filterBlobsAsync( - String containerName, - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include) { + public Mono filterBlobsAsync(String containerName, Integer timeout, String requestId, + String where, String marker, Integer maxresults, List include) { return filterBlobsWithResponseAsync(containerName, timeout, requestId, where, marker, maxresults, include) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3465,225 +3736,286 @@ public Mono filterBlobsAsync( * @return the result of a Filter Blobs API call on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono filterBlobsAsync( - String containerName, - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include, - Context context) { - return filterBlobsWithResponseAsync( - containerName, timeout, requestId, where, marker, maxresults, include, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono filterBlobsAsync(String containerName, Integer timeout, String requestId, + String where, String marker, Integer maxresults, List include, Context context) { + return filterBlobsWithResponseAsync(containerName, timeout, requestId, where, marker, maxresults, include, + context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include) { + public Mono> filterBlobsNoCustomHeadersWithResponseAsync(String containerName, + Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include) { final String restype = "container"; final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); return FluxUtil.withContext( - context -> - service.filterBlobsNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context)); + context -> service.filterBlobsNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context)); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include, - Context context) { + public Mono> filterBlobsNoCustomHeadersWithResponseAsync(String containerName, + Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include, Context context) { + final String restype = "container"; + final String comp = "blobs"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase filterBlobsWithResponse(String containerName, + Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include, Context context) { + final String restype = "container"; + final String comp = "blobs"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where, + String marker, Integer maxresults, List include) { + return filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, include, + Context.NONE).getValue(); + } + + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search + * expression. Filter blobs searches within the given container. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response filterBlobsNoCustomHeadersWithResponse(String containerName, Integer timeout, + String requestId, String where, String marker, Integer maxresults, List include, + Context context) { final String restype = "container"; final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.filterBlobsNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseWithResponseAsync( - String containerName, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> acquireLeaseWithResponseAsync(String containerName, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { final String comp = "lease"; final String restype = "container"; final String action = "acquire"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.acquireLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.acquireLease(this.client.getUrl(), containerName, comp, restype, + action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context)); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3691,105 +4023,74 @@ public Mono> acquireLeaseWithR * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseWithResponseAsync( - String containerName, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> acquireLeaseWithResponseAsync(String containerName, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "acquire"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLease(this.client.getUrl(), containerName, comp, restype, action, timeout, duration, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireLeaseAsync( - String containerName, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { - return acquireLeaseWithResponseAsync( - containerName, - timeout, - duration, - proposedLeaseId, - ifModifiedSince, - ifUnmodifiedSince, - requestId) - .flatMap(ignored -> Mono.empty()); + public Mono acquireLeaseAsync(String containerName, Integer timeout, Integer duration, String proposedLeaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + return acquireLeaseWithResponseAsync(containerName, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, requestId).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3797,108 +4098,74 @@ public Mono acquireLeaseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono acquireLeaseAsync( - String containerName, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - return acquireLeaseWithResponseAsync( - containerName, - timeout, - duration, - proposedLeaseId, - ifModifiedSince, - ifUnmodifiedSince, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public Mono acquireLeaseAsync(String containerName, Integer timeout, Integer duration, String proposedLeaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return acquireLeaseWithResponseAsync(containerName, timeout, duration, proposedLeaseId, ifModifiedSince, + ifUnmodifiedSince, requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> acquireLeaseNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId) { final String comp = "lease"; final String restype = "container"; final String action = "acquire"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.acquireLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.acquireLeaseNoCustomHeaders(this.client.getUrl(), containerName, + comp, restype, action, timeout, duration, proposedLeaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context)); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never - * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using - * renew or change. + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -3906,196 +4173,255 @@ public Mono> acquireLeaseNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> acquireLeaseNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - Integer duration, - String proposedLeaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> acquireLeaseNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "acquire"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - duration, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseNoCustomHeaders(this.client.getUrl(), containerName, comp, restype, action, timeout, + duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public ResponseBase acquireLeaseWithResponse(String containerName, + Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; - final String action = "release"; + final String action = "acquire"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.releaseLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, duration, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - final String comp = "lease"; - final String restype = "container"; + public void acquireLease(String containerName, Integer timeout, Integer duration, String proposedLeaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + acquireLeaseWithResponse(containerName, timeout, duration, proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, + requestId, Context.NONE); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never + * expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or + * change. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response acquireLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, + Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "acquire"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> releaseLeaseWithResponseAsync(String containerName, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId) { + final String comp = "lease"; + final String restype = "container"; + final String action = "release"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.releaseLease(this.client.getUrl(), containerName, comp, restype, + action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context)); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> releaseLeaseWithResponseAsync(String containerName, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; final String action = "release"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releaseLeaseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { - return releaseLeaseWithResponseAsync( - containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId) - .flatMap(ignored -> Mono.empty()); + public Mono releaseLeaseAsync(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + return releaseLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + requestId).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4103,88 +4429,63 @@ public Mono releaseLeaseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono releaseLeaseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - return releaseLeaseWithResponseAsync( - containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId, context) - .flatMap(ignored -> Mono.empty()); + public Mono releaseLeaseAsync(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return releaseLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> releaseLeaseNoCustomHeadersWithResponseAsync(String containerName, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { final String comp = "lease"; final String restype = "container"; final String action = "release"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.releaseLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, + comp, restype, action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context)); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4192,107 +4493,174 @@ public Mono> releaseLeaseNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> releaseLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> releaseLeaseNoCustomHeadersWithResponseAsync(String containerName, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { final String comp = "lease"; final String restype = "container"; final String action = "release"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, comp, restype, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase releaseLeaseWithResponse(String containerName, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "release"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void releaseLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + releaseLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId, + Context.NONE); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response releaseLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "release"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> renewLeaseWithResponseAsync(String containerName, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId) { final String comp = "lease"; final String restype = "container"; final String action = "renew"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.renewLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.renewLease(this.client.getUrl(), containerName, comp, restype, + action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context)); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4300,86 +4668,63 @@ public Mono> renewLeaseWithRespo * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> renewLeaseWithResponseAsync(String containerName, + String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "renew"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renewLeaseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { - return renewLeaseWithResponseAsync( - containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId) - .flatMap(ignored -> Mono.empty()); + public Mono renewLeaseAsync(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + return renewLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + requestId).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4387,781 +4732,890 @@ public Mono renewLeaseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono renewLeaseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - return renewLeaseWithResponseAsync( - containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId, context) - .flatMap(ignored -> Mono.empty()); + public Mono renewLeaseAsync(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return renewLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> renewLeaseNoCustomHeadersWithResponseAsync(String containerName, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { final String comp = "lease"; final String restype = "container"; final String action = "renew"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.renewLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.renewLeaseNoCustomHeaders(this.client.getUrl(), containerName, + comp, restype, action, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context)); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renewLeaseNoCustomHeadersWithResponseAsync(String containerName, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseNoCustomHeaders(this.client.getUrl(), containerName, comp, restype, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase renewLeaseWithResponse(String containerName, String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void renewLease(String containerName, String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + renewLeaseWithResponse(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId, + Context.NONE); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response renewLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "renew"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakLeaseWithResponseAsync(String containerName, + Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId) { + final String comp = "lease"; + final String restype = "container"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.breakLease(this.client.getUrl(), containerName, comp, restype, + action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context)); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakLeaseWithResponseAsync(String containerName, + Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLease(this.client.getUrl(), containerName, comp, restype, action, timeout, breakPeriod, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakLeaseAsync(String containerName, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + return breakLeaseWithResponseAsync(containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, + requestId).flatMap(ignored -> Mono.empty()); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakLeaseAsync(String containerName, Integer timeout, Integer breakPeriod, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return breakLeaseWithResponseAsync(containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, + requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. - * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> renewLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String leaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> breakLeaseNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { final String comp = "lease"; final String restype = "container"; - final String action = "renew"; + final String action = "break"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, + comp, restype, action, timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context)); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseWithResponseAsync( - String containerName, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> breakLeaseNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { final String comp = "lease"; final String restype = "container"; final String action = "break"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.breakLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, comp, restype, action, timeout, + breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseWithResponseAsync( - String containerName, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public ResponseBase breakLeaseWithResponse(String containerName, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { final String comp = "lease"; final String restype = "container"; final String action = "break"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, breakPeriod, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono breakLeaseAsync( - String containerName, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { - return breakLeaseWithResponseAsync( - containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, requestId) - .flatMap(ignored -> Mono.empty()); + public void breakLease(String containerName, Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { + breakLeaseWithResponse(containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, requestId, + Context.NONE); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. + * If longer, the time remaining on the lease is used. A new lease will not be available before the break period has + * expired, but the lease may be held for longer than the break period. If this header does not appear with a break + * operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks + * immediately. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono breakLeaseAsync( - String containerName, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - return breakLeaseWithResponseAsync( - containerName, timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, requestId, context) - .flatMap(ignored -> Mono.empty()); + public Response breakLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, + Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, + Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "break"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public Mono> changeLeaseWithResponseAsync(String containerName, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId) { final String comp = "lease"; final String restype = "container"; - final String action = "break"; + final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.breakLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.changeLease(this.client.getUrl(), containerName, comp, restype, + action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context)); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param breakPeriod For a break operation, proposed duration the lease should continue before it is broken, in - * seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the - * lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break - * period has expired, but the lease may be held for longer than the break period. If this header does not - * appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an - * infinite lease breaks immediately. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> breakLeaseNoCustomHeadersWithResponseAsync( - String containerName, - Integer timeout, - Integer breakPeriod, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Mono> changeLeaseWithResponseAsync(String containerName, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; - final String action = "break"; + final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - breakPeriod, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLease(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseWithResponseAsync( - String containerName, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { - final String comp = "lease"; - final String restype = "container"; - final String action = "change"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.changeLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + public Mono changeLeaseAsync(String containerName, String leaseId, String proposedLeaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + return changeLeaseWithResponseAsync(containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, requestId).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseWithResponseAsync( - String containerName, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - final String comp = "lease"; - final String restype = "container"; - final String action = "change"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLease( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + public Mono changeLeaseAsync(String containerName, String leaseId, String proposedLeaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { + return changeLeaseWithResponseAsync(containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, + ifUnmodifiedSince, requestId, context).flatMap(ignored -> Mono.empty()); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeLeaseAsync( - String containerName, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { - return changeLeaseWithResponseAsync( - containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, ifUnmodifiedSince, requestId) - .flatMap(ignored -> Mono.empty()); + public Mono> changeLeaseNoCustomHeadersWithResponseAsync(String containerName, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId) { + final String comp = "lease"; + final String restype = "container"; + final String action = "change"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, + comp, restype, action, timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context)); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeLeaseAsync( - String containerName, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { - return changeLeaseWithResponseAsync( - containerName, - leaseId, - proposedLeaseId, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public Mono> changeLeaseNoCustomHeadersWithResponseAsync(String containerName, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { + final String comp = "lease"; + final String restype = "container"; + final String action = "change"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, comp, restype, action, timeout, + leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId) { + public ResponseBase changeLeaseWithResponse(String containerName, + String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.changeLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); + } + + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 + * seconds, or can be infinite. + * + * @param containerName The container name. + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void changeLease(String containerName, String leaseId, String proposedLeaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { + changeLeaseWithResponse(containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, ifUnmodifiedSince, + requestId, Context.NONE); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) - * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID - * string formats. + * if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID + * string formats. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> changeLeaseNoCustomHeadersWithResponseAsync( - String containerName, - String leaseId, - String proposedLeaseId, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String requestId, - Context context) { + public Response changeLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String requestId, Context context) { final String comp = "lease"; final String restype = "container"; final String action = "change"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseNoCustomHeaders( - this.client.getUrl(), - containerName, - comp, - restype, - action, - timeout, - leaseId, - proposedLeaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5169,60 +5623,42 @@ public Mono> changeLeaseNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> - listBlobFlatSegmentWithResponseAsync( - String containerName, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId) { + listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); return FluxUtil.withContext( - context -> - service.listBlobFlatSegment( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + context -> service.listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context)); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5231,99 +5667,74 @@ public Mono> changeLeaseNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> - listBlobFlatSegmentWithResponseAsync( - String containerName, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId, - Context context) { + listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId, Context context) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.listBlobFlatSegment( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of blobs on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobFlatSegmentAsync( - String containerName, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId) { - return listBlobFlatSegmentWithResponseAsync( - containerName, prefix, marker, maxresults, include, timeout, requestId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono listBlobFlatSegmentAsync(String containerName, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String requestId) { + return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, timeout, + requestId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5331,41 +5742,34 @@ public Mono listBlobFlatSegmentAsync( * @return an enumeration of blobs on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobFlatSegmentAsync( - String containerName, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId, - Context context) { - return listBlobFlatSegmentWithResponseAsync( - containerName, prefix, marker, maxresults, include, timeout, requestId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono listBlobFlatSegmentAsync(String containerName, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String requestId, + Context context) { + return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, timeout, + requestId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5373,59 +5777,42 @@ public Mono listBlobFlatSegmentAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( - String containerName, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId) { + String containerName, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String requestId) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.listBlobFlatSegmentNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil.withContext(context -> service.listBlobFlatSegmentNoCustomHeaders(this.client.getUrl(), + containerName, restype, comp, prefix, marker, maxresults, includeConverted, timeout, + this.client.getVersion(), requestId, accept, context)); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5434,61 +5821,164 @@ public Mono> listBlobFlatSegmentNoCustomH */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( - String containerName, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId, - Context context) { + String containerName, String prefix, String marker, Integer maxresults, List include, + Integer timeout, String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegmentNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, prefix, + marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobFlatSegmentWithResponse(String containerName, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId, Context context) { + final String restype = "container"; + final String comp = "list"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String requestId) { + return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, timeout, requestId, + Context.NONE).getValue(); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobFlatSegmentNoCustomHeadersWithResponse(String containerName, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId, Context context) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.listBlobFlatSegmentNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, + context); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5496,65 +5986,45 @@ public Mono> listBlobFlatSegmentNoCustomH */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> - listBlobHierarchySegmentWithResponseAsync( - String containerName, - String delimiter, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId) { + listBlobHierarchySegmentWithResponseAsync(String containerName, String delimiter, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String requestId) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.listBlobHierarchySegment( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - delimiter, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil.withContext(context -> service.listBlobHierarchySegment(this.client.getUrl(), containerName, + restype, comp, prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), + requestId, accept, context)); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5563,108 +6033,82 @@ public Mono> listBlobFlatSegmentNoCustomH */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> - listBlobHierarchySegmentWithResponseAsync( - String containerName, - String delimiter, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId, - Context context) { + listBlobHierarchySegmentWithResponseAsync(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"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.listBlobHierarchySegment( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - delimiter, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegment(this.client.getUrl(), containerName, restype, comp, prefix, delimiter, + marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of blobs on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobHierarchySegmentAsync( - String containerName, - String delimiter, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId) { - return listBlobHierarchySegmentWithResponseAsync( - containerName, delimiter, prefix, marker, maxresults, include, timeout, requestId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono listBlobHierarchySegmentAsync(String containerName, String delimiter, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId) { + return listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, include, + timeout, requestId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5672,45 +6116,37 @@ public Mono listBlobHierarchySegmentAsync( * @return an enumeration of blobs on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listBlobHierarchySegmentAsync( - String containerName, - String delimiter, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId, - Context context) { - return listBlobHierarchySegmentWithResponseAsync( - containerName, delimiter, prefix, marker, maxresults, include, timeout, requestId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono listBlobHierarchySegmentAsync(String containerName, String delimiter, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId, Context context) { + return listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, include, + timeout, requestId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5718,64 +6154,45 @@ public Mono listBlobHierarchySegmentAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync( - String containerName, - String delimiter, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId) { + String containerName, String delimiter, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String requestId) { final String restype = "container"; final String comp = "list"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.listBlobHierarchySegmentNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - delimiter, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil.withContext(context -> service.listBlobHierarchySegmentNoCustomHeaders(this.client.getUrl(), + containerName, restype, comp, prefix, delimiter, marker, maxresults, includeConverted, timeout, + this.client.getVersion(), requestId, accept, context)); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the - * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the - * appearance of the delimiter character. The delimiter may be a single character or a string. + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5784,82 +6201,176 @@ public Mono> listBlobHierarchySegmen */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync( - String containerName, - String delimiter, - String prefix, - String marker, - Integer maxresults, - List include, - Integer timeout, - String requestId, + 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"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegmentNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, + prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, + accept, context); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobHierarchySegmentWithResponse(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"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.listBlobHierarchySegmentNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - prefix, - delimiter, - marker, - maxresults, - includeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, + delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, + context); } /** - * Returns the sku name and account kind. - * + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * + * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, + String prefix, String marker, Integer maxresults, List include, Integer timeout, + String requestId) { + return listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, + timeout, requestId, Context.NONE).getValue(); + } + + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container. + * * @param containerName The container name. + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the + * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the + * appearance of the delimiter character. The delimiter may be a single character or a string. + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of blobs along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobHierarchySegmentNoCustomHeadersWithResponse( + 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"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.listBlobHierarchySegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, + accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync( - String containerName, Integer timeout, String requestId) { + public Mono> + getAccountInfoWithResponseAsync(String containerName) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccountInfo( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getAccountInfo(this.client.getUrl(), containerName, restype, + comp, this.client.getVersion(), accept, context)); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5867,51 +6378,33 @@ public Mono> getAccountInfoW * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync( - String containerName, Integer timeout, String requestId, Context context) { + public Mono> + getAccountInfoWithResponseAsync(String containerName, Context context) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfo( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + return service.getAccountInfo(this.client.getUrl(), containerName, restype, comp, this.client.getVersion(), + accept, context); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccountInfoAsync(String containerName, Integer timeout, String requestId) { - return getAccountInfoWithResponseAsync(containerName, timeout, requestId).flatMap(ignored -> Mono.empty()); + public Mono getAccountInfoAsync(String containerName) { + return getAccountInfoWithResponseAsync(containerName).flatMap(ignored -> Mono.empty()); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5919,54 +6412,32 @@ public Mono getAccountInfoAsync(String containerName, Integer timeout, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccountInfoAsync(String containerName, Integer timeout, String requestId, Context context) { - return getAccountInfoWithResponseAsync(containerName, timeout, requestId, context) - .flatMap(ignored -> Mono.empty()); + public Mono getAccountInfoAsync(String containerName, Context context) { + return getAccountInfoWithResponseAsync(containerName, context).flatMap(ignored -> Mono.empty()); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( - String containerName, Integer timeout, String requestId) { + public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(String containerName) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccountInfoNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getAccountInfoNoCustomHeaders(this.client.getUrl(), + containerName, restype, comp, this.client.getVersion(), accept, context)); } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5974,20 +6445,63 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( - String containerName, Integer timeout, String requestId, Context context) { + public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(String containerName, Context context) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getAccountInfoNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, + this.client.getVersion(), accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getAccountInfoWithResponse(String containerName, + Context context) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getAccountInfoSync(this.client.getUrl(), containerName, restype, comp, this.client.getVersion(), + accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo(String containerName) { + getAccountInfoWithResponse(containerName, Context.NONE); + } + + /** + * Returns the sku name and account kind. + * + * @param containerName The container name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccountInfoNoCustomHeadersWithResponse(String containerName, Context context) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeaders( - this.client.getUrl(), - containerName, - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context); + return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + this.client.getVersion(), accept, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index dabe67a518211..73671016388d7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -49,22 +49,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PageBlobs. */ +/** + * An instance of this class provides access to all the operations defined in PageBlobs. + */ public final class PageBlobsImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PageBlobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureBlobStorageImpl client; /** * Initializes an instance of PageBlobsImpl. - * + * * @param client the instance of the service client containing this operation class. */ PageBlobsImpl(AzureBlobStorageImpl client) { - this.service = - RestProxy.create(PageBlobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(PageBlobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -76,618 +82,818 @@ public final class PageBlobsImpl { @ServiceInterface(name = "AzureBlobStoragePage") public interface PageBlobsService { @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> create(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @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-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> createNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @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-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase createSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @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-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response createNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @HeaderParam("x-ms-blob-type") String blobType, @QueryParam("timeout") Integer timeout, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, + @HeaderParam("x-ms-blob-content-type") String contentType, + @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, + @HeaderParam("x-ms-blob-content-language") String contentLanguage, + @HeaderParam("x-ms-blob-content-md5") String contentMd5, + @HeaderParam("x-ms-blob-cache-control") String cacheControl, + @HeaderParam("x-ms-meta-") Map metadata, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @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-tags") String blobTagsString, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, + @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, + @HeaderParam("x-ms-legal-hold") Boolean legalHold, @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> create( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @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-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + Mono> uploadPages(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> createNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @HeaderParam("x-ms-blob-type") String blobType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("x-ms-access-tier") PremiumPageBlobAccessTier tier, - @HeaderParam("x-ms-blob-content-type") String contentType, - @HeaderParam("x-ms-blob-content-encoding") String contentEncoding, - @HeaderParam("x-ms-blob-content-language") String contentLanguage, - @HeaderParam("x-ms-blob-content-md5") String contentMd5, - @HeaderParam("x-ms-blob-cache-control") String cacheControl, - @HeaderParam("x-ms-meta-") Map metadata, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-blob-content-disposition") String contentDisposition, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @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-tags") String blobTagsString, - @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 immutabilityPolicyExpiry, - @HeaderParam("x-ms-immutability-policy-mode") BlobImmutabilityPolicyMode immutabilityPolicyMode, - @HeaderParam("x-ms-legal-hold") Boolean legalHold, - @HeaderParam("Accept") String accept, - Context context); + Mono> uploadPagesNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadPages( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> uploadPages(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadPagesNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono> uploadPagesNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadPages( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase uploadPagesSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadPagesNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-MD5") String transactionalContentMD5, - @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/octet-stream") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Response uploadPagesNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-MD5") String transactionalContentMD5, + @HeaderParam("x-ms-content-crc64") String transactionalContentCrc64, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> clearPages( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("Content-Length") long contentLength, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> clearPages(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> clearPagesNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("Content-Length") long contentLength, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> clearPagesNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadPagesFromURL( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, - @HeaderParam("Content-Length") long contentLength, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @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("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase clearPagesSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({201}) + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response clearPagesNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, + @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> uploadPagesFromURL(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> uploadPagesFromURLNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase uploadPagesFromURLSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response uploadPagesFromURLNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, + @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, + @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, + @HeaderParam("Content-Length") long contentLength, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, @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-if-tags") String ifTags, + @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("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, + @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getPageRanges(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> getPageRangesNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase getPageRangesSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); + + @Get("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> uploadPagesFromURLNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @HeaderParam("x-ms-page-write") String pageWrite, - @HeaderParam("x-ms-copy-source") String sourceUrl, - @HeaderParam("x-ms-source-range") String sourceRange, - @HeaderParam("x-ms-source-content-md5") String sourceContentMD5, - @HeaderParam("x-ms-source-content-crc64") String sourceContentcrc64, - @HeaderParam("Content-Length") long contentLength, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @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("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("x-ms-copy-source-authorization") String copySourceAuthorization, - @HeaderParam("Accept") String accept, - Context context); + Response getPageRangesNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getPageRanges( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @HeaderParam("Accept") String accept, - Context context); + Mono> getPageRangesDiff(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, + @HeaderParam("x-ms-previous-snapshot-url") String prevSnapshotUrl, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getPageRangesNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @HeaderParam("Accept") String accept, - Context context); + Mono> getPageRangesDiffNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, + @HeaderParam("x-ms-previous-snapshot-url") String prevSnapshotUrl, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getPageRangesDiff( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("timeout") Integer timeout, - @QueryParam("prevsnapshot") String prevsnapshot, - @HeaderParam("x-ms-previous-snapshot-url") String prevSnapshotUrl, - @HeaderParam("x-ms-range") String range, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase getPageRangesDiffSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, + @HeaderParam("x-ms-previous-snapshot-url") String prevSnapshotUrl, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Get("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getPageRangesDiffNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("snapshot") String snapshot, - @QueryParam("timeout") Integer timeout, - @QueryParam("prevsnapshot") String prevsnapshot, - @HeaderParam("x-ms-previous-snapshot-url") String prevSnapshotUrl, - @HeaderParam("x-ms-range") String range, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @HeaderParam("Accept") String accept, - Context context); + Response getPageRangesDiffNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("snapshot") String snapshot, + @QueryParam("timeout") Integer timeout, @QueryParam("prevsnapshot") String prevsnapshot, + @HeaderParam("x-ms-previous-snapshot-url") String prevSnapshotUrl, @HeaderParam("x-ms-range") String range, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> resize( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-blob-content-length") long blobContentLength, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> resize(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-blob-content-length") long blobContentLength, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> resizeNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @HeaderParam("x-ms-encryption-scope") String encryptionScope, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-blob-content-length") long blobContentLength, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> resizeNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-blob-content-length") long blobContentLength, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase resizeSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-blob-content-length") long blobContentLength, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response resizeNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-encryption-key") String encryptionKey, + @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, + @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, + @HeaderParam("x-ms-encryption-scope") String encryptionScope, + @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-if-tags") String ifTags, @HeaderParam("x-ms-blob-content-length") long blobContentLength, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> updateSequenceNumber( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @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, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @PathParam("containerName") String containerName, + @PathParam("blob") String blob, @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @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, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> updateSequenceNumberNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @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, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase updateSequenceNumberSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @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, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response updateSequenceNumberNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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, + @HeaderParam("x-ms-if-tags") String ifTags, + @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, + @HeaderParam("Accept") String accept, Context context); + + @Put("/{containerName}/{blob}") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Mono> copyIncremental(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({200}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> updateSequenceNumberNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @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, - @HeaderParam("x-ms-if-tags") String ifTags, - @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, - @HeaderParam("Accept") String accept, - Context context); + Mono> copyIncrementalNoCustomHeaders(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> copyIncremental( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + ResponseBase copyIncrementalSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Put("/{containerName}/{blob}") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> copyIncrementalNoCustomHeaders( - @HostParam("url") String url, - @PathParam("containerName") String containerName, - @PathParam("blob") String blob, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @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-if-tags") String ifTags, - @HeaderParam("x-ms-copy-source") String copySource, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Response copyIncrementalNoCustomHeadersSync(@HostParam("url") String url, + @PathParam("containerName") String containerName, @PathParam("blob") String blob, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @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-if-tags") String ifTags, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); } /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param tier Optional. Indicates the tier to be set on the page blob. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -701,29 +907,13 @@ Mono> copyIncrementalNoCustomHeaders( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String containerName, - String blob, - long contentLength, - long blobContentLength, - Integer timeout, - PremiumPageBlobAccessTier tier, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> createWithResponseAsync(String containerName, String blob, + long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "PageBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -777,81 +967,50 @@ public Mono> createWithResponseAsync( } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.create( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - tier, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - blobSequenceNumber, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.create(this.client.getUrl(), containerName, blob, blobType, + timeout, contentLength, tier, contentType, contentEncoding, contentLanguage, contentMd5Converted, + cacheControl, metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context)); } /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param tier Optional. Indicates the tier to be set on the page blob. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -866,30 +1025,13 @@ public Mono> createWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String containerName, - String blob, - long contentLength, - long blobContentLength, - Integer timeout, - PremiumPageBlobAccessTier tier, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> createWithResponseAsync(String containerName, String blob, + long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "PageBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -943,79 +1085,50 @@ public Mono> createWithResponseAsync( } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.create( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - tier, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - blobSequenceNumber, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.create(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, tier, + contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, + blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); } /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param tier Optional. Indicates the tier to be set on the page blob. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1029,85 +1142,48 @@ public Mono> createWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String containerName, - String blob, - long contentLength, - long blobContentLength, - Integer timeout, - PremiumPageBlobAccessTier tier, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return createWithResponseAsync( - containerName, - blob, - contentLength, - blobContentLength, - timeout, - tier, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono createAsync(String containerName, String blob, long contentLength, long blobContentLength, + Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, Long blobSequenceNumber, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return createWithResponseAsync(containerName, blob, contentLength, blobContentLength, timeout, tier, metadata, + leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, + encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param tier Optional. Indicates the tier to be set on the page blob. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1122,87 +1198,48 @@ public Mono createAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String containerName, - String blob, - long contentLength, - long blobContentLength, - Integer timeout, - PremiumPageBlobAccessTier tier, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return createWithResponseAsync( - containerName, - blob, - contentLength, - blobContentLength, - timeout, - tier, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - requestId, - blobTagsString, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - legalHold, - blobHttpHeaders, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono createAsync(String containerName, String blob, long contentLength, long blobContentLength, + Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, Long blobSequenceNumber, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return createWithResponseAsync(containerName, blob, contentLength, blobContentLength, timeout, tier, metadata, + leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, + encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param tier Optional. Indicates the tier to be set on the page blob. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1216,29 +1253,13 @@ public Mono createAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - long blobContentLength, - Integer timeout, - PremiumPageBlobAccessTier tier, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> createNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String blobType = "PageBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1292,81 +1313,50 @@ public Mono> createNoCustomHeadersWithResponseAsync( } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return FluxUtil.withContext( - context -> - service.createNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - tier, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - blobSequenceNumber, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return FluxUtil.withContext(context -> service.createNoCustomHeaders(this.client.getUrl(), containerName, blob, + blobType, timeout, contentLength, tier, contentType, contentEncoding, contentLanguage, contentMd5Converted, + cacheControl, metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context)); } /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param tier Optional. Indicates the tier to be set on the page blob. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value - * pairs are specified, the operation will copy the metadata from the source blob or file to the destination - * blob. If one or more name-value pairs are specified, the destination blob is created with the specified - * metadata, and metadata is not copied from the source blob or file. Note that beginning with version - * 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing - * Containers, Blobs, and Metadata for more information. + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param blobTagsString Optional. Used to set blob tags in various blob operations. * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. @@ -1381,30 +1371,13 @@ public Mono> createNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - long blobContentLength, - Integer timeout, - PremiumPageBlobAccessTier tier, - Map metadata, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - String blobTagsString, - OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, - Boolean legalHold, - BlobHttpHeaders blobHttpHeaders, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> createNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String blobType = "PageBlob"; final String accept = "application/xml"; String contentTypeInternal = null; @@ -1458,110 +1431,103 @@ public Mono> createNoCustomHeadersWithResponseAsync( } String encryptionScope = encryptionScopeInternal; String contentMd5Converted = Base64Util.encodeToString(contentMd5); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 immutabilityPolicyExpiryConverted = - immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - blobType, - timeout, - contentLength, - tier, - contentType, - contentEncoding, - contentLanguage, - contentMd5Converted, - cacheControl, - metadata, - leaseId, - contentDisposition, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - blobSequenceNumber, - this.client.getVersion(), - requestId, - blobTagsString, - immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, - legalHold, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.createNoCustomHeaders(this.client.getUrl(), containerName, blob, blobType, timeout, + contentLength, tier, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, + metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); } /** - * The Upload Pages operation writes a range of pages to a page blob. - * + * The Create operation creates a new page blob. + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - final String comp = "page"; - final String pageWrite = "update"; + public ResponseBase createWithResponse(String containerName, String blob, + long contentLength, long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, + Map metadata, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "PageBlob"; final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; String encryptionKeyInternal = null; if (cpkInfo != null) { encryptionKeyInternal = cpkInfo.getEncryptionKey(); @@ -1582,108 +1548,157 @@ public Mono> uploadPagesWithResp encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.uploadPages( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, tier, + contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, + blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); } /** - * The Upload Pages operation writes a range of pages to a page blob. - * + * The Create operation creates a new page blob. + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(String containerName, String blob, long contentLength, long blobContentLength, Integer timeout, + PremiumPageBlobAccessTier tier, Map metadata, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, BlobHttpHeaders blobHttpHeaders, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + createWithResponse(containerName, blob, contentLength, blobContentLength, timeout, tier, metadata, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, + blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, + encryptionScopeParam, Context.NONE); + } + + /** + * The Create operation creates a new page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param tier Optional. Indicates the tier to be set on the page blob. + * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value + * pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. + * If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and + * metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names + * must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata + * for more information. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param blobTagsString Optional. Used to set blob tags in various blob operations. + * @param immutabilityPolicyExpiry Specifies the date time when the blobs immutability policy is set to expire. + * @param immutabilityPolicyMode Specifies the immutability policy mode to set on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param blobHttpHeaders Parameter group. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - final String comp = "page"; - final String pageWrite = "update"; + public Response createNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + long blobContentLength, Integer timeout, PremiumPageBlobAccessTier tier, Map metadata, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String blobType = "PageBlob"; final String accept = "application/xml"; + String contentTypeInternal = null; + if (blobHttpHeaders != null) { + contentTypeInternal = blobHttpHeaders.getContentType(); + } + String contentType = contentTypeInternal; + String contentEncodingInternal = null; + if (blobHttpHeaders != null) { + contentEncodingInternal = blobHttpHeaders.getContentEncoding(); + } + String contentEncoding = contentEncodingInternal; + String contentLanguageInternal = null; + if (blobHttpHeaders != null) { + contentLanguageInternal = blobHttpHeaders.getContentLanguage(); + } + String contentLanguage = contentLanguageInternal; + byte[] contentMd5Internal = null; + if (blobHttpHeaders != null) { + contentMd5Internal = blobHttpHeaders.getContentMd5(); + } + byte[] contentMd5 = contentMd5Internal; + String cacheControlInternal = null; + if (blobHttpHeaders != null) { + cacheControlInternal = blobHttpHeaders.getCacheControl(); + } + String cacheControl = cacheControlInternal; + String contentDispositionInternal = null; + if (blobHttpHeaders != null) { + contentDispositionInternal = blobHttpHeaders.getContentDisposition(); + } + String contentDisposition = contentDispositionInternal; String encryptionKeyInternal = null; if (cpkInfo != null) { encryptionKeyInternal = cpkInfo.getEncryptionKey(); @@ -1704,46 +1719,24 @@ public Mono> uploadPagesWithResp encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); - String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPages( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + String contentMd5Converted = Base64Util.encodeToString(contentMd5); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 immutabilityPolicyExpiryConverted + = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); + return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + contentLength, tier, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, + metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1751,81 +1744,79 @@ public Mono> uploadPagesWithResp * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesAsync( - String containerName, - String blob, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return uploadPagesWithResponseAsync( - containerName, - blob, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - range, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono> uploadPagesWithResponseAsync(String containerName, + String blob, long contentLength, Flux body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + final String comp = "page"; + final String pageWrite = "update"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.uploadPages(this.client.getUrl(), containerName, blob, comp, + pageWrite, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, + range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1833,139 +1824,216 @@ public Mono uploadPagesAsync( * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesAsync( - String containerName, - String blob, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return uploadPagesWithResponseAsync( - containerName, - blob, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - range, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); - } - - /** - * The Upload Pages operation writes a range of pages to a page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param contentLength The length of the request. - * @param body Initial data. - * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. - * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. - * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. - * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. + public Mono> uploadPagesWithResponseAsync(String containerName, + String blob, long contentLength, Flux body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "update"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.uploadPages(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadPagesAsync(String containerName, String blob, long contentLength, Flux body, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return uploadPagesWithResponseAsync(containerName, blob, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadPagesAsync(String containerName, String blob, long contentLength, Flux body, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return uploadPagesWithResponseAsync(containerName, blob, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadPagesNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -1991,46 +2059,21 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.uploadPagesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.uploadPagesNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, pageWrite, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, + timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2038,25 +2081,25 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2066,28 +2109,12 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Flux body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadPagesNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Flux body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -2113,44 +2140,21 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPagesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.uploadPagesNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2158,25 +2162,25 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2185,27 +2189,12 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadPagesWithResponseAsync(String containerName, + String blob, long contentLength, BinaryData body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -2231,46 +2220,21 @@ public Mono> uploadPagesWithResp String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.uploadPages( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.uploadPages(this.client.getUrl(), containerName, blob, comp, + pageWrite, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, + range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2278,25 +2242,25 @@ public Mono> uploadPagesWithResp * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2306,28 +2270,12 @@ public Mono> uploadPagesWithResp * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadPagesWithResponseAsync(String containerName, + String blob, long contentLength, BinaryData body, byte[] transactionalContentMD5, + byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -2353,44 +2301,20 @@ public Mono> uploadPagesWithResp String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPages( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.uploadPages(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, context); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2398,25 +2322,25 @@ public Mono> uploadPagesWithResp * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2425,54 +2349,20 @@ public Mono> uploadPagesWithResp * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return uploadPagesWithResponseAsync( - containerName, - blob, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - range, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono uploadPagesAsync(String containerName, String blob, long contentLength, BinaryData body, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return uploadPagesWithResponseAsync(containerName, blob, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2480,25 +2370,25 @@ public Mono uploadPagesAsync( * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2508,56 +2398,20 @@ public Mono uploadPagesAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return uploadPagesWithResponseAsync( - containerName, - blob, - contentLength, - body, - transactionalContentMD5, - transactionalContentCrc64, - timeout, - range, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono uploadPagesAsync(String containerName, String blob, long contentLength, BinaryData body, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return uploadPagesWithResponseAsync(containerName, blob, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2565,25 +2419,25 @@ public Mono uploadPagesAsync( * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2592,27 +2446,12 @@ public Mono uploadPagesAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadPagesNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -2638,46 +2477,21 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.uploadPagesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.uploadPagesNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, pageWrite, contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, + timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context)); } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2685,25 +2499,25 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2713,28 +2527,220 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - BinaryData body, - byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadPagesNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "update"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.uploadPagesNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase uploadPagesWithResponse(String containerName, String blob, + long contentLength, BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "update"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); + String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.uploadPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadPages(String containerName, String blob, long contentLength, BinaryData body, + byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + uploadPagesWithResponse(containerName, blob, contentLength, body, transactionalContentMD5, + transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, cpkInfo, encryptionScopeParam, Context.NONE); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param body Initial data. + * @param transactionalContentMD5 Specify the transactional md5 for the body, to be validated by the service. + * @param transactionalContentCrc64 Specify the transactional crc64 for the body, to be validated by the service. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response uploadPagesNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, + String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + Context context) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -2760,67 +2766,44 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPagesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - transactionalContentMD5Converted, - transactionalContentCrc64Converted, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - body, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.uploadPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); } /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2829,24 +2812,11 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync( * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clearPagesWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> clearPagesWithResponseAsync(String containerName, + String blob, long contentLength, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "page"; final String pageWrite = "clear"; final String accept = "application/xml"; @@ -2870,66 +2840,43 @@ public Mono> clearPagesWithRespon encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.clearPages( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.clearPages(this.client.getUrl(), containerName, blob, comp, + pageWrite, contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context)); } /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -2939,25 +2886,11 @@ public Mono> clearPagesWithRespon * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clearPagesWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> clearPagesWithResponseAsync(String containerName, + String blob, long contentLength, Integer timeout, String range, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "page"; final String pageWrite = "clear"; final String accept = "application/xml"; @@ -2981,64 +2914,43 @@ public Mono> clearPagesWithRespon encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPages( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.clearPages(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, timeout, + range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3047,71 +2959,42 @@ public Mono> clearPagesWithRespon * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono clearPagesAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return clearPagesWithResponseAsync( - containerName, - blob, - contentLength, - timeout, - range, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono clearPagesAsync(String containerName, String blob, long contentLength, Integer timeout, + String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return clearPagesWithResponseAsync(containerName, blob, contentLength, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); } /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3121,73 +3004,43 @@ public Mono clearPagesAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono clearPagesAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return clearPagesWithResponseAsync( - containerName, - blob, - contentLength, - timeout, - range, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono clearPagesAsync(String containerName, String blob, long contentLength, Integer timeout, + String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + Context context) { + return clearPagesWithResponseAsync(containerName, blob, contentLength, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context) + .flatMap(ignored -> Mono.empty()); } /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3196,24 +3049,11 @@ public Mono clearPagesAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clearPagesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> clearPagesNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "page"; final String pageWrite = "clear"; final String accept = "application/xml"; @@ -3237,66 +3077,43 @@ public Mono> clearPagesNoCustomHeadersWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.clearPagesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.clearPagesNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, pageWrite, contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, + ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context)); } /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3306,25 +3123,11 @@ public Mono> clearPagesNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clearPagesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long contentLength, - Integer timeout, - String range, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> clearPagesNoCustomHeadersWithResponseAsync(String containerName, String blob, + long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "page"; final String pageWrite = "clear"; final String accept = "application/xml"; @@ -3348,79 +3151,248 @@ public Mono> clearPagesNoCustomHeadersWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPagesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - contentLength, - timeout, - range, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.clearPagesNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); } /** - * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase clearPagesWithResponse(String containerName, String blob, + long contentLength, Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "clear"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.clearPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, + timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void clearPages(String containerName, String blob, long contentLength, Integer timeout, String range, + String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + clearPagesWithResponse(containerName, blob, contentLength, timeout, range, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.NONE); + } + + /** + * The Clear Pages operation clears a set of pages from a page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param contentLength The length of the request. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response clearPagesNoCustomHeadersWithResponse(String containerName, String blob, long contentLength, + Integer timeout, String range, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "clear"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.clearPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. The length of this range should match the - * ContentLength header and x-ms-range/Range destination range header. + * ContentLength header and x-ms-range/Range destination range header. * @param contentLength The length of the request. * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and - * range-end is required. + * range-end is required. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3430,32 +3402,13 @@ public Mono> clearPagesNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> uploadPagesFromURLWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - String sourceRange, - long contentLength, - String range, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + String containerName, String blob, String sourceUrl, String sourceRange, long contentLength, String range, + byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -3481,94 +3434,64 @@ public Mono> uploadPagesF String encryptionScope = encryptionScopeInternal; String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.uploadPagesFromURL( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - contentLength, - timeout, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return FluxUtil.withContext(context -> service.uploadPagesFromURL(this.client.getUrl(), containerName, blob, + comp, pageWrite, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, + contentLength, timeout, range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context)); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. The length of this range should match the - * ContentLength header and x-ms-range/Range destination range header. + * ContentLength header and x-ms-range/Range destination range header. * @param contentLength The length of the request. * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and - * range-end is required. + * range-end is required. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3579,33 +3502,13 @@ public Mono> uploadPagesF */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> uploadPagesFromURLWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - String sourceRange, - long contentLength, - String range, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + String containerName, String blob, String sourceUrl, String sourceRange, long contentLength, String range, + byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -3631,92 +3534,64 @@ public Mono> uploadPagesF String encryptionScope = encryptionScopeInternal; String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURL( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - contentLength, - timeout, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.uploadPagesFromURL(this.client.getUrl(), containerName, blob, comp, pageWrite, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. The length of this range should match the - * ContentLength header and x-ms-range/Range destination range header. + * ContentLength header and x-ms-range/Range destination range header. * @param contentLength The length of the request. * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and - * range-end is required. + * range-end is required. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3725,104 +3600,61 @@ public Mono> uploadPagesF * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesFromURLAsync( - String containerName, - String blob, - String sourceUrl, - String sourceRange, - long contentLength, - String range, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return uploadPagesFromURLWithResponseAsync( - containerName, - blob, - sourceUrl, - sourceRange, - contentLength, - range, - sourceContentMD5, - sourceContentcrc64, - timeout, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - requestId, - copySourceAuthorization, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public Mono uploadPagesFromURLAsync(String containerName, String blob, String sourceUrl, String sourceRange, + long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return uploadPagesFromURLWithResponseAsync(containerName, blob, sourceUrl, sourceRange, contentLength, range, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam).flatMap(ignored -> Mono.empty()); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. The length of this range should match the - * ContentLength header and x-ms-range/Range destination range header. + * ContentLength header and x-ms-range/Range destination range header. * @param contentLength The length of the request. * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and - * range-end is required. + * range-end is required. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -3832,106 +3664,61 @@ public Mono uploadPagesFromURLAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadPagesFromURLAsync( - String containerName, - String blob, - String sourceUrl, - String sourceRange, - long contentLength, - String range, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return uploadPagesFromURLWithResponseAsync( - containerName, - blob, - sourceUrl, - sourceRange, - contentLength, - range, - sourceContentMD5, - sourceContentcrc64, - timeout, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - requestId, - copySourceAuthorization, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public Mono uploadPagesFromURLAsync(String containerName, String blob, String sourceUrl, String sourceRange, + long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + return uploadPagesFromURLWithResponseAsync(containerName, blob, sourceUrl, sourceRange, contentLength, range, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam, context).flatMap(ignored -> Mono.empty()); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. The length of this range should match the - * ContentLength header and x-ms-range/Range destination range header. + * ContentLength header and x-ms-range/Range destination range header. * @param contentLength The length of the request. * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and - * range-end is required. + * range-end is required. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3940,33 +3727,14 @@ public Mono uploadPagesFromURLAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - String sourceRange, - long contentLength, - String range, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -3992,94 +3760,64 @@ public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.uploadPagesFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - contentLength, - timeout, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return FluxUtil.withContext(context -> service.uploadPagesFromURLNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, pageWrite, sourceUrl, sourceRange, sourceContentMD5Converted, + sourceContentcrc64Converted, contentLength, timeout, range, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, encryptionScope, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, + ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context)); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. * @param sourceRange Bytes of source data in the specified range. The length of this range should match the - * ContentLength header and x-ms-range/Range destination range header. + * ContentLength header and x-ms-range/Range destination range header. * @param contentLength The length of the request. * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and - * range-end is required. + * range-end is required. * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy - * source. + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence - * number less than or equal to the specified. + * number less than or equal to the specified. * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number - * less than the specified. + * less than the specified. * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified - * sequence number. + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since - * the specified date/time. + * the specified date/time. * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified - * since the specified date/time. + * since the specified date/time. * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to - * copy source. + * copy source. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. @@ -4089,34 +3827,14 @@ public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String sourceUrl, - String sourceRange, - long contentLength, - String range, - byte[] sourceContentMD5, - byte[] sourceContentcrc64, - Integer timeout, - String leaseId, - Long ifSequenceNumberLessThanOrEqualTo, - Long ifSequenceNumberLessThan, - Long ifSequenceNumberEqualTo, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - OffsetDateTime sourceIfModifiedSince, - OffsetDateTime sourceIfUnmodifiedSince, - String sourceIfMatch, - String sourceIfNoneMatch, - String requestId, - String copySourceAuthorization, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync(String containerName, String blob, + String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "page"; final String pageWrite = "update"; final String accept = "application/xml"; @@ -4142,489 +3860,582 @@ public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync( String encryptionScope = encryptionScopeInternal; String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 sourceIfModifiedSinceConverted = - sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); - DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = - sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURLNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - pageWrite, - sourceUrl, - sourceRange, - sourceContentMD5Converted, - sourceContentcrc64Converted, - contentLength, - timeout, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - leaseId, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, - sourceIfMatch, - sourceIfNoneMatch, - this.client.getVersion(), - requestId, - copySourceAuthorization, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.uploadPagesFromURLNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, pageWrite, + sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, + range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); } /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a - * page blob. - * - * @param containerName The container name. - * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. - * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. - * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. - * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. - * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. - * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages along with {@link ResponseBase} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPageRangesWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults) { - final String comp = "pagelist"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.getPageRanges( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context)); - } - - /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a - * page blob. - * + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. + * * @param containerName The container name. * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should match the + * ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and + * range-end is required. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages along with {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPageRangesWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults, - Context context) { - final String comp = "pagelist"; + public ResponseBase uploadPagesFromURLWithResponse(String containerName, + String blob, String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "update"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRanges( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context); + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.uploadPagesFromURLSync(this.client.getUrl(), containerName, blob, comp, pageWrite, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); } /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a - * page blob. - * + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. + * * @param containerName The container name. * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should match the + * ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and + * range-end is required. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults) { - return getPageRangesWithResponseAsync( - containerName, - blob, - snapshot, - timeout, - range, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - marker, - maxresults) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void uploadPagesFromURL(String containerName, String blob, String sourceUrl, String sourceRange, + long contentLength, String range, byte[] sourceContentMD5, byte[] sourceContentcrc64, Integer timeout, + String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String requestId, String copySourceAuthorization, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + uploadPagesFromURLWithResponse(containerName, blob, sourceUrl, sourceRange, contentLength, range, + sourceContentMD5, sourceContentcrc64, timeout, leaseId, ifSequenceNumberLessThanOrEqualTo, + ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, + copySourceAuthorization, cpkInfo, encryptionScopeParam, Context.NONE); } /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a - * page blob. - * + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. + * * @param containerName The container name. * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should match the + * ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 aligned and + * range-end is required. + * @param sourceContentMD5 Specify the md5 calculated for the range of bytes that must be read from the copy source. + * @param sourceContentcrc64 Specify the crc64 calculated for the range of bytes that must be read from the copy + * source. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param range Return only the bytes of the blob in the specified range. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this header value to operate only on a blob if it has a sequence + * number less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this header value to operate only on a blob if it has a sequence number + * less than the specified. + * @param ifSequenceNumberEqualTo Specify this header value to operate only on a blob if it has the specified + * sequence number. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param sourceIfModifiedSince Specify this header value to operate only on a blob if it has been modified since + * the specified date/time. + * @param sourceIfUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified + * since the specified date/time. + * @param sourceIfMatch Specify an ETag value to operate only on blobs with a matching value. + * @param sourceIfNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * analytics logs when storage analytics logging is enabled. + * @param copySourceAuthorization Only Bearer type is supported. Credentials should be a valid OAuth access token to + * copy source. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults, - Context context) { - return getPageRangesWithResponseAsync( - containerName, - blob, - snapshot, - timeout, - range, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - marker, - maxresults, - context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } + public Response uploadPagesFromURLNoCustomHeadersWithResponse(String containerName, String blob, + String sourceUrl, String sourceRange, long contentLength, String range, byte[] sourceContentMD5, + byte[] sourceContentcrc64, Integer timeout, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String requestId, String copySourceAuthorization, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { + final String comp = "page"; + final String pageWrite = "update"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); + String sourceContentcrc64Converted = Base64Util.encodeToString(sourceContentcrc64); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + DateTimeRfc1123 sourceIfModifiedSinceConverted + = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); + DateTimeRfc1123 sourceIfUnmodifiedSinceConverted + = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); + return service.uploadPagesFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, + sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, + range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesWithResponseAsync( + String containerName, String blob, String snapshot, Integer timeout, String range, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String marker, Integer maxresults) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.getPageRanges(this.client.getUrl(), containerName, blob, comp, + snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context)); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesWithResponseAsync( + String containerName, String blob, String snapshot, Integer timeout, String range, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRanges(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, range, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPageRangesAsync(String containerName, String blob, String snapshot, Integer timeout, + String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { + return getPageRangesWithResponseAsync(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPageRangesAsync(String containerName, String blob, String snapshot, Integer timeout, + String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults, Context context) { + return getPageRangesWithResponseAsync(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, context) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a * page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of pages along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPageRangesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults) { + public Mono> getPageRangesNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults) { final String comp = "pagelist"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.getPageRangesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.getPageRangesNoCustomHeaders(this.client.getUrl(), containerName, + blob, comp, snapshot, timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context)); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a * page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4632,92 +4443,222 @@ public Mono> getPageRangesNoCustomHeadersWithResponseAsync( * @return the list of pages along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPageRangesNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults, - Context context) { + public Mono> getPageRangesNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults, Context context) { final String comp = "pagelist"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, + range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPageRangesWithResponse(String containerName, + String blob, String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, range, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRanges(String containerName, String blob, String snapshot, Integer timeout, String range, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { + return getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, Context.NONE).getValue(); + } + + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a + * page blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPageRangesNoCustomHeadersWithResponse(String containerName, String blob, + String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context); } /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous - * snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as - * the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently - * supported only for blobs created on or after January 1, 2016. + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4725,96 +4666,64 @@ public Mono> getPageRangesNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getPageRangesDiffWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String prevsnapshot, - String prevSnapshotUrl, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults) { + String containerName, String blob, String snapshot, Integer timeout, String prevsnapshot, + String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults) { final String comp = "pagelist"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.getPageRangesDiff( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - prevsnapshot, - prevSnapshotUrl, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.getPageRangesDiff(this.client.getUrl(), containerName, blob, + comp, snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, + maxresults, accept, context)); } /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous - * snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as - * the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently - * supported only for blobs created on or after January 1, 2016. + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -4823,180 +4732,120 @@ public Mono> getPageRa */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getPageRangesDiffWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String prevsnapshot, - String prevSnapshotUrl, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults, - Context context) { + String containerName, String blob, String snapshot, Integer timeout, String prevsnapshot, + String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults, Context context) { final String comp = "pagelist"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiff( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - prevsnapshot, - prevSnapshotUrl, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesDiff(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, + prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context); } /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous - * snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as - * the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently - * supported only for blobs created on or after January 1, 2016. + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of pages on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesDiffAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String prevsnapshot, - String prevSnapshotUrl, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults) { - return getPageRangesDiffWithResponseAsync( - containerName, - blob, - snapshot, - timeout, - prevsnapshot, - prevSnapshotUrl, - range, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - marker, - maxresults) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getPageRangesDiffAsync(String containerName, String blob, String snapshot, Integer timeout, + String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults) { + return getPageRangesDiffWithResponseAsync(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, + range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, + maxresults).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous - * snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as - * the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently - * supported only for blobs created on or after January 1, 2016. + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. * @param range Return only the bytes of the blob in the specified range. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -5004,281 +4853,565 @@ public Mono getPageRangesDiffAsync( * @return the list of pages on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPageRangesDiffAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String prevsnapshot, - String prevSnapshotUrl, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults, - Context context) { - return getPageRangesDiffWithResponseAsync( - containerName, - blob, - snapshot, - timeout, - prevsnapshot, - prevSnapshotUrl, - range, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - marker, - maxresults, - context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getPageRangesDiffAsync(String containerName, String blob, String snapshot, Integer timeout, + String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults, Context context) { + return getPageRangesDiffWithResponseAsync(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, + range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, + maxresults, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesDiffNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String marker, Integer maxresults) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.getPageRangesDiffNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context)); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesDiffNoCustomHeadersWithResponseAsync(String containerName, String blob, + String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesDiffNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, + timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, + maxresults, accept, context); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPageRangesDiffWithResponse(String containerName, + String blob, String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesDiffSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, + prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRangesDiff(String containerName, String blob, String snapshot, Integer timeout, + String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + String marker, Integer maxresults) { + return getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, + range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, + maxresults, Context.NONE).getValue(); + } + + /** + * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot or version. + * + * @param containerName The container name. + * @param blob The blob name. + * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob + * snapshot to retrieve. For more information on working with blob snapshots, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating + * a Snapshot of a Blob.</a>. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that + * specifies that the response will contain only pages that were changed between target blob and previous snapshot. + * Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot + * specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently supported only + * for blobs created on or after January 1, 2016. + * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and + * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were + * changed between the target blob and its previous snapshot. + * @param range Return only the bytes of the blob in the specified range. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of pages along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPageRangesDiffNoCustomHeadersWithResponse(String containerName, String blob, + String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, String marker, Integer maxresults, Context context) { + final String comp = "pagelist"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.getPageRangesDiffNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, + maxresults, accept, context); + } + + /** + * Resize the Blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resizeWithResponseAsync(String containerName, String blob, + long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + final String comp = "properties"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.resize(this.client.getUrl(), containerName, blob, comp, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context)); + } + + /** + * Resize the Blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resizeWithResponseAsync(String containerName, String blob, + long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "properties"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.resize(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context); } /** - * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were - * changed between target blob and previous snapshot or version. - * + * Resize the Blob. + * * @param containerName The container name. * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous - * snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as - * the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently - * supported only for blobs created on or after January 1, 2016. - * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. - * @param range Return only the bytes of the blob in the specified range. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPageRangesDiffNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String prevsnapshot, - String prevSnapshotUrl, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults) { - final String comp = "pagelist"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.getPageRangesDiffNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - prevsnapshot, - prevSnapshotUrl, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context)); + public Mono resizeAsync(String containerName, String blob, long blobContentLength, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + return resizeWithResponseAsync(containerName, blob, blobContentLength, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam) + .flatMap(ignored -> Mono.empty()); } /** - * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were - * changed between target blob and previous snapshot or version. - * + * Resize the Blob. + * * @param containerName The container name. * @param blob The blob name. - * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating - * a Snapshot of a Blob.</a>. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param prevsnapshot Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that - * specifies that the response will contain only pages that were changed between target blob and previous - * snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as - * the snapshot specified by prevsnapshot is the older of the two. Note that incremental snapshots are currently - * supported only for blobs created on or after January 1, 2016. - * @param prevSnapshotUrl Optional. This header is only supported in service versions 2019-04-19 and after and - * specifies the URL of a previous snapshot of the target blob. The response will only contain pages that were - * changed between the target blob and its previous snapshot. - * @param range Return only the bytes of the blob in the specified range. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * analytics logs when storage analytics logging is enabled. + * @param cpkInfo Parameter group. + * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of pages along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPageRangesDiffNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String snapshot, - Integer timeout, - String prevsnapshot, - String prevSnapshotUrl, - String range, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - String marker, - Integer maxresults, - Context context) { - final String comp = "pagelist"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiffNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - snapshot, - timeout, - prevsnapshot, - prevSnapshotUrl, - range, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - this.client.getVersion(), - requestId, - marker, - maxresults, - accept, - context); + public Mono resizeAsync(String containerName, String blob, long blobContentLength, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, + Context context) { + return resizeWithResponseAsync(containerName, blob, blobContentLength, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, context) + .flatMap(ignored -> Mono.empty()); } /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> resizeWithResponseAsync( - String containerName, - String blob, - long blobContentLength, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> resizeNoCustomHeadersWithResponseAsync(String containerName, String blob, + long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { final String comp = "properties"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -5301,79 +5434,49 @@ public Mono> resizeWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.resize( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.resizeNoCustomHeaders(this.client.getUrl(), containerName, blob, + comp, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, + this.client.getVersion(), requestId, accept, context)); } /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> resizeWithResponseAsync( - String containerName, - String blob, - long blobContentLength, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> resizeNoCustomHeadersWithResponseAsync(String containerName, String blob, + long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { final String comp = "properties"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -5396,196 +5499,148 @@ public Mono> resizeWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.resize( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.resizeNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context); } /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resizeAsync( - String containerName, - String blob, - long blobContentLength, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return resizeWithResponseAsync( - containerName, - blob, - blobContentLength, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam) - .flatMap(ignored -> Mono.empty()); + public ResponseBase resizeWithResponse(String containerName, String blob, + long blobContentLength, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + final String comp = "properties"; + final String accept = "application/xml"; + String encryptionKeyInternal = null; + if (cpkInfo != null) { + encryptionKeyInternal = cpkInfo.getEncryptionKey(); + } + String encryptionKey = encryptionKeyInternal; + String encryptionKeySha256Internal = null; + if (cpkInfo != null) { + encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); + } + String encryptionKeySha256 = encryptionKeySha256Internal; + EncryptionAlgorithmType encryptionAlgorithmInternal = null; + if (cpkInfo != null) { + encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); + } + EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; + String encryptionScopeInternal = null; + if (encryptionScopeParam != null) { + encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); + } + String encryptionScope = encryptionScopeInternal; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.resizeSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context); } /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resizeAsync( - String containerName, - String blob, - long blobContentLength, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { - return resizeWithResponseAsync( - containerName, - blob, - blobContentLength, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - cpkInfo, - encryptionScopeParam, - context) - .flatMap(ignored -> Mono.empty()); + public void resize(String containerName, String blob, long blobContentLength, Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + resizeWithResponse(containerName, blob, blobContentLength, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam, Context.NONE); } /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * must be aligned to a 512-byte boundary. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param cpkInfo Parameter group. * @param encryptionScopeParam Parameter group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> resizeNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long blobContentLength, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Response resizeNoCustomHeadersWithResponse(String containerName, String blob, long blobContentLength, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo, + EncryptionScope encryptionScopeParam, Context context) { final String comp = "properties"; final String accept = "application/xml"; String encryptionKeyInternal = null; @@ -5608,151 +5663,84 @@ public Mono> resizeNoCustomHeadersWithResponseAsync( encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); } String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.resizeNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.resizeNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context); } /** - * Resize the Blob. - * + * Update the sequence number of the blob. + * * @param containerName The container name. * @param blob The blob name. - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size - * must be aligned to a 512-byte boundary. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> resizeNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - long blobContentLength, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, - Context context) { + public Mono> updateSequenceNumberWithResponseAsync( + String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId) { final String comp = "properties"; final String accept = "application/xml"; - String encryptionKeyInternal = null; - if (cpkInfo != null) { - encryptionKeyInternal = cpkInfo.getEncryptionKey(); - } - String encryptionKey = encryptionKeyInternal; - String encryptionKeySha256Internal = null; - if (cpkInfo != null) { - encryptionKeySha256Internal = cpkInfo.getEncryptionKeySha256(); - } - String encryptionKeySha256 = encryptionKeySha256Internal; - EncryptionAlgorithmType encryptionAlgorithmInternal = null; - if (cpkInfo != null) { - encryptionAlgorithmInternal = cpkInfo.getEncryptionAlgorithm(); - } - EncryptionAlgorithmType encryptionAlgorithm = encryptionAlgorithmInternal; - String encryptionScopeInternal = null; - if (encryptionScopeParam != null) { - encryptionScopeInternal = encryptionScopeParam.getEncryptionScope(); - } - String encryptionScope = encryptionScopeInternal; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.resizeNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - blobContentLength, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.updateSequenceNumber(this.client.getUrl(), containerName, blob, + comp, timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context)); } /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This - * property applies to page blobs only. This property indicates how the service should modify the blob's - * sequence number. + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5760,373 +5748,310 @@ public Mono> resizeNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateSequenceNumberWithResponseAsync( - String containerName, - String blob, - SequenceNumberActionType sequenceNumberAction, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId) { + String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, Context context) { final String comp = "properties"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.updateSequenceNumber( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sequenceNumberAction, - blobSequenceNumber, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.updateSequenceNumber(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sequenceNumberAction, + blobSequenceNumber, this.client.getVersion(), requestId, accept, context); } /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This - * property applies to page blobs only. This property indicates how the service should modify the blob's - * sequence number. + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSequenceNumberWithResponseAsync( - String containerName, - String blob, - SequenceNumberActionType sequenceNumberAction, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - Context context) { - final String comp = "properties"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.updateSequenceNumber( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sequenceNumberAction, - blobSequenceNumber, - this.client.getVersion(), - requestId, - accept, - context); + public Mono updateSequenceNumberAsync(String containerName, String blob, + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId) { + return updateSequenceNumberWithResponseAsync(containerName, blob, sequenceNumberAction, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId) + .flatMap(ignored -> Mono.empty()); } /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This - * property applies to page blobs only. This property indicates how the service should modify the blob's - * sequence number. + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSequenceNumberAsync( - String containerName, - String blob, - SequenceNumberActionType sequenceNumberAction, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId) { - return updateSequenceNumberWithResponseAsync( - containerName, - blob, - sequenceNumberAction, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - requestId) - .flatMap(ignored -> Mono.empty()); + public Mono updateSequenceNumberAsync(String containerName, String blob, + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId, Context context) { + return updateSequenceNumberWithResponseAsync(containerName, blob, sequenceNumberAction, timeout, leaseId, + ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, context) + .flatMap(ignored -> Mono.empty()); } /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This - * property applies to page blobs only. This property indicates how the service should modify the blob's - * sequence number. + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @param context The context to associate with this operation. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateSequenceNumberAsync( - String containerName, - String blob, - SequenceNumberActionType sequenceNumberAction, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - Context context) { - return updateSequenceNumberWithResponseAsync( - containerName, - blob, - sequenceNumberAction, - timeout, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public Mono> updateSequenceNumberNoCustomHeadersWithResponseAsync(String containerName, String blob, + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId) { + final String comp = "properties"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext( + context -> service.updateSequenceNumberNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context)); } /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This - * property applies to page blobs only. This property indicates how the service should modify the blob's - * sequence number. + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSequenceNumberNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - SequenceNumberActionType sequenceNumberAction, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId) { + public Mono> updateSequenceNumberNoCustomHeadersWithResponseAsync(String containerName, String blob, + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId, Context context) { final String comp = "properties"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.updateSequenceNumberNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sequenceNumberAction, - blobSequenceNumber, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.updateSequenceNumberNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context); } /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This - * property applies to page blobs only. This property indicates how the service should modify the blob's - * sequence number. + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can - * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase updateSequenceNumberWithResponse( + String containerName, String blob, SequenceNumberActionType sequenceNumberAction, Integer timeout, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId, Context context) { + final String comp = "properties"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.updateSequenceNumberSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sequenceNumberAction, + blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + } + + /** + * Update the sequence number of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateSequenceNumberNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - SequenceNumberActionType sequenceNumberAction, - Integer timeout, - String leaseId, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - Long blobSequenceNumber, - String requestId, - Context context) { + public void updateSequenceNumber(String containerName, String blob, SequenceNumberActionType sequenceNumberAction, + Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, String requestId) { + updateSequenceNumberWithResponse(containerName, blob, sequenceNumberAction, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, Context.NONE); + } + + /** + * Update the sequence number of the blob. + * + * @param containerName The container name. + * @param blob The blob name. + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This + * property applies to page blobs only. This property indicates how the service should modify the blob's sequence + * number. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param blobSequenceNumber Set for page blobs only. The sequence number is a user-controlled value that you can + * use to track requests. The value of the sequence number must be between 0 and 2^63 - 1. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSequenceNumberNoCustomHeadersWithResponse(String containerName, String blob, + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, Long blobSequenceNumber, + String requestId, Context context) { final String comp = "properties"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.updateSequenceNumberNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - leaseId, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - sequenceNumberAction, - blobSequenceNumber, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.updateSequenceNumberNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context); } /** @@ -6134,24 +6059,24 @@ public Mono> updateSequenceNumberNoCustomHeadersWithResponseAsync * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -6159,40 +6084,17 @@ public Mono> updateSequenceNumberNoCustomHeadersWithResponseAsync */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> copyIncrementalWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { + String containerName, String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { final String comp = "incrementalcopy"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.copyIncremental( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.copyIncremental(this.client.getUrl(), containerName, blob, comp, + timeout, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context)); } /** @@ -6200,24 +6102,24 @@ public Mono> copyIncremental * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -6226,39 +6128,18 @@ public Mono> copyIncremental */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> copyIncrementalWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + String containerName, String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { final String comp = "incrementalcopy"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyIncremental( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.copyIncremental(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); } /** @@ -6266,53 +6147,35 @@ public Mono> copyIncremental * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyIncrementalAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { - return copyIncrementalWithResponseAsync( - containerName, - blob, - copySource, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId) - .flatMap(ignored -> Mono.empty()); + public Mono copyIncrementalAsync(String containerName, String blob, String copySource, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + return copyIncrementalWithResponseAsync(containerName, blob, copySource, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId).flatMap(ignored -> Mono.empty()); } /** @@ -6320,24 +6183,24 @@ public Mono copyIncrementalAsync( * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -6345,31 +6208,11 @@ public Mono copyIncrementalAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyIncrementalAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { - return copyIncrementalWithResponseAsync( - containerName, - blob, - copySource, - timeout, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - requestId, - context) - .flatMap(ignored -> Mono.empty()); + public Mono copyIncrementalAsync(String containerName, String blob, String copySource, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId, Context context) { + return copyIncrementalWithResponseAsync(containerName, blob, copySource, timeout, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context).flatMap(ignored -> Mono.empty()); } /** @@ -6377,65 +6220,42 @@ public Mono copyIncrementalAsync( * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> copyIncrementalNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId) { + public Mono> copyIncrementalNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId) { final String comp = "incrementalcopy"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return FluxUtil.withContext( - context -> - service.copyIncrementalNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - this.client.getVersion(), - requestId, - accept, - context)); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return FluxUtil.withContext(context -> service.copyIncrementalNoCustomHeaders(this.client.getUrl(), + containerName, blob, comp, timeout, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, copySource, this.client.getVersion(), requestId, accept, context)); } /** @@ -6443,24 +6263,24 @@ public Mono> copyIncrementalNoCustomHeadersWithResponseAsync( * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in - * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request - * URI. The source blob must either be public or must be authenticated via a shared access signature. + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the - * specified date/time. + * specified date/time. * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since - * the specified date/time. + * the specified date/time. * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -6468,39 +6288,141 @@ public Mono> copyIncrementalNoCustomHeadersWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> copyIncrementalNoCustomHeadersWithResponseAsync( - String containerName, - String blob, - String copySource, - Integer timeout, - OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, - String ifMatch, - String ifNoneMatch, - String ifTags, - String requestId, - Context context) { + public Mono> copyIncrementalNoCustomHeadersWithResponseAsync(String containerName, String blob, + String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { + final String comp = "incrementalcopy"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.copyIncrementalNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase copyIncrementalWithResponse(String containerName, + String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, + Context context) { + final String comp = "incrementalcopy"; + final String accept = "application/xml"; + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.copyIncrementalSync(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void copyIncremental(String containerName, String blob, String copySource, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + String ifTags, String requestId) { + copyIncrementalWithResponse(containerName, blob, copySource, timeout, ifModifiedSince, ifUnmodifiedSince, + ifMatch, ifNoneMatch, ifTags, requestId, Context.NONE); + } + + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The snapshot + * is copied such that only the differential changes between the previously copied snapshot are transferred to the + * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as + * usual. This API is supported since REST version 2016-05-31. + * + * @param containerName The container name. + * @param blob The blob name. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in + * length that specifies a page blob snapshot. The value should be URL-encoded as it would appear in a request URI. + * The source blob must either be public or must be authenticated via a shared access signature. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifModifiedSince Specify this header value to operate only on a blob if it has been modified since the + * specified date/time. + * @param ifUnmodifiedSince Specify this header value to operate only on a blob if it has not been modified since + * the specified date/time. + * @param ifMatch Specify an ETag value to operate only on blobs with a matching value. + * @param ifNoneMatch Specify an ETag value to operate only on blobs without a matching value. + * @param ifTags Specify a SQL where clause on blob tags to operate only on blobs with a matching value. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response copyIncrementalNoCustomHeadersWithResponse(String containerName, String blob, + String copySource, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { final String comp = "incrementalcopy"; final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted = - ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted = - ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyIncrementalNoCustomHeaders( - this.client.getUrl(), - containerName, - blob, - comp, - timeout, - ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - this.client.getVersion(), - requestId, - accept, - context); + DateTimeRfc1123 ifModifiedSinceConverted + = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); + DateTimeRfc1123 ifUnmodifiedSinceConverted + = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); + return service.copyIncrementalNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java index ef8abf7b6c54b..d0639e80625c2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java @@ -19,6 +19,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; @@ -47,6 +48,7 @@ import com.azure.storage.blob.models.KeyInfo; import com.azure.storage.blob.models.ListBlobContainersIncludeType; import com.azure.storage.blob.models.UserDelegationKey; +import java.io.InputStream; import java.nio.ByteBuffer; import java.util.List; import java.util.Objects; @@ -54,17 +56,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in Services. */ +/** + * An instance of this class provides access to all the operations defined in Services. + */ public final class ServicesImpl { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ServicesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureBlobStorageImpl client; /** * Initializes an instance of ServicesImpl. - * + * * @param client the instance of the service client containing this operation class. */ ServicesImpl(AzureBlobStorageImpl client) { @@ -80,332 +88,385 @@ public final class ServicesImpl { @ServiceInterface(name = "AzureBlobStorageServ") public interface ServicesService { @Put("/") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setProperties( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") BlobServiceProperties blobServiceProperties, - @HeaderParam("Accept") String accept, - Context context); + Mono> setProperties(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobServiceProperties blobServiceProperties, + @HeaderParam("Accept") String accept, Context context); @Put("/") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> setPropertiesNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") BlobServiceProperties blobServiceProperties, - @HeaderParam("Accept") String accept, - Context context); + Mono> setPropertiesNoCustomHeaders(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobServiceProperties blobServiceProperties, + @HeaderParam("Accept") String accept, Context context); + + @Put("/") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase setPropertiesSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobServiceProperties blobServiceProperties, + @HeaderParam("Accept") String accept, Context context); + + @Put("/") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response setPropertiesNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BlobServiceProperties blobServiceProperties, + @HeaderParam("Accept") String accept, Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> getProperties( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getPropertiesNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> getPropertiesNoCustomHeaders(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase getPropertiesSync( + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response getPropertiesNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Get("/") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> getStatistics( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getStatisticsNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> getStatisticsNoCustomHeaders(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase getStatisticsSync( + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response getStatisticsNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Get("/") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> listBlobContainersSegment( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @QueryParam("prefix") String prefix, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String listBlobContainersIncludeType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String listBlobContainersIncludeType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> listBlobContainersSegmentNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @QueryParam("prefix") String prefix, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String listBlobContainersIncludeType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> listBlobContainersSegmentNoCustomHeaders(@HostParam("url") String url, + @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String listBlobContainersIncludeType, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase listBlobContainersSegmentSync( + @HostParam("url") String url, @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, + @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, + @QueryParam("include") String listBlobContainersIncludeType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response listBlobContainersSegmentNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("comp") String comp, @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String listBlobContainersIncludeType, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Post("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> getUserDelegationKey( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") KeyInfo keyInfo, - @HeaderParam("Accept") String accept, - Context context); + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); @Post("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getUserDelegationKeyNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") KeyInfo keyInfo, - @HeaderParam("Accept") String accept, - Context context); + Mono> getUserDelegationKeyNoCustomHeaders(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase getUserDelegationKeySync( + @HostParam("url") String url, @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response getUserDelegationKeyNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") KeyInfo keyInfo, + @HeaderParam("Accept") String accept, Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getAccountInfo( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> getAccountInfo(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> getAccountInfoNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + Mono> getAccountInfoNoCustomHeaders(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase getAccountInfoSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response getAccountInfoNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("restype") String restype, @QueryParam("comp") String comp, + @HeaderParam("x-ms-version") String version, @HeaderParam("Accept") String accept, Context context); @Post("/") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> submitBatch( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono>> submitBatch(@HostParam("url") String url, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") Flux body, @HeaderParam("Accept") String accept, Context context); @Post("/") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono submitBatchNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") Flux body, - @HeaderParam("Accept") String accept, - Context context); + Mono submitBatchNoCustomHeaders(@HostParam("url") String url, @QueryParam("comp") String comp, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-Type") String multipartContentType, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") Flux body, @HeaderParam("Accept") String accept, Context context); @Post("/") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono>> submitBatch( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Mono>> submitBatch(@HostParam("url") String url, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, Context context); @Post("/") - @ExpectedResponses({202}) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono submitBatchNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Content-Type") String multipartContentType, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") BinaryData body, - @HeaderParam("Accept") String accept, - Context context); + Mono submitBatchNoCustomHeaders(@HostParam("url") String url, @QueryParam("comp") String comp, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Content-Type") String multipartContentType, + @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @BodyParam("application/xml") BinaryData body, + @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase submitBatchSync(@HostParam("url") String url, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, Context context); + + @Post("/") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response submitBatchNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("comp") String comp, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Content-Type") String multipartContentType, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") BinaryData body, @HeaderParam("Accept") String accept, Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> filterBlobs( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("where") String where, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, - @HeaderParam("Accept") String accept, - Context context); + Mono> filterBlobs(@HostParam("url") String url, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); @Get("/") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) - Mono> filterBlobsNoCustomHeaders( - @HostParam("url") String url, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @QueryParam("where") String where, - @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, - @HeaderParam("Accept") String accept, - Context context); + Mono> filterBlobsNoCustomHeaders(@HostParam("url") String url, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase filterBlobsSync(@HostParam("url") String url, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); + + @Get("/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response filterBlobsNoCustomHeadersSync(@HostParam("url") String url, + @QueryParam("comp") String comp, @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @QueryParam("where") String where, @QueryParam("marker") String marker, + @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, + @HeaderParam("Accept") String accept, Context context); @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> - listBlobContainersSegmentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("url") String url, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, - Context context); + listBlobContainersSegmentNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("url") String url, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, + Context context); @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(BlobStorageException.class) Mono> listBlobContainersSegmentNextNoCustomHeaders( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("url") String url, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + ResponseBase + listBlobContainersSegmentNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("url") String url, @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(BlobStorageException.class) + Response listBlobContainersSegmentNextNoCustomHeadersSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("Accept") String accept, Context context); } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setPropertiesWithResponseAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { + public Mono> + setPropertiesWithResponseAsync(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.setProperties( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - blobServiceProperties, - accept, - context)); + return FluxUtil.withContext(context -> service.setProperties(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, blobServiceProperties, accept, context)); } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -414,54 +475,46 @@ public Mono> setPropertiesWithR */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setPropertiesWithResponseAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { + BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.setProperties( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - blobServiceProperties, - accept, - context); + return service.setProperties(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + blobServiceProperties, accept, context); } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setPropertiesAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { + public Mono setPropertiesAsync(BlobServiceProperties blobServiceProperties, Integer timeout, + String requestId) { return setPropertiesWithResponseAsync(blobServiceProperties, timeout, requestId) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -469,22 +522,22 @@ public Mono setPropertiesAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setPropertiesAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { + public Mono setPropertiesAsync(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, + Context context) { return setPropertiesWithResponseAsync(blobServiceProperties, timeout, requestId, context) - .flatMap(ignored -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -492,34 +545,24 @@ public Mono setPropertiesAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setPropertiesNoCustomHeadersWithResponseAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { + BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.setPropertiesNoCustomHeaders( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - blobServiceProperties, - accept, - context)); + return FluxUtil.withContext(context -> service.setPropertiesNoCustomHeaders(this.client.getUrl(), restype, comp, + timeout, this.client.getVersion(), requestId, blobServiceProperties, accept, context)); } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -528,98 +571,150 @@ public Mono> setPropertiesNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> setPropertiesNoCustomHeadersWithResponseAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { + BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.setPropertiesNoCustomHeaders(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, blobServiceProperties, accept, context); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setPropertiesWithResponse( + BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.setPropertiesNoCustomHeaders( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - blobServiceProperties, - accept, - context); + return service.setPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, blobServiceProperties, accept, context); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void setProperties(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { + setPropertiesWithResponse(blobServiceProperties, timeout, requestId, Context.NONE); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param blobServiceProperties The StorageService properties. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProperties blobServiceProperties, + Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.setPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, blobServiceProperties, accept, context); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules along with {@link ResponseBase} on successful completion of {@link - * Mono}. + * (Cross-Origin Resource Sharing) rules along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesWithResponseAsync( - Integer timeout, String requestId) { + public Mono> + getPropertiesWithResponseAsync(Integer timeout, String requestId) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getProperties( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getProperties(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context)); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules along with {@link ResponseBase} on successful completion of {@link - * Mono}. + * (Cross-Origin Resource Sharing) rules along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesWithResponseAsync( - Integer timeout, String requestId, Context context) { + public Mono> + getPropertiesWithResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.getProperties( - this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); + return service.getProperties(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + accept, context); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules on successful completion of {@link Mono}. + * (Cross-Origin Resource Sharing) rules on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesAsync(Integer timeout, String requestId) { @@ -629,127 +724,181 @@ public Mono getPropertiesAsync(Integer timeout, String re /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules on successful completion of {@link Mono}. + * (Cross-Origin Resource Sharing) rules on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getPropertiesAsync(Integer timeout, String requestId, Context context) { return getPropertiesWithResponseAsync(timeout, requestId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules along with {@link Response} on successful completion of {@link Mono}. + * (Cross-Origin Resource Sharing) rules along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesNoCustomHeadersWithResponseAsync( - Integer timeout, String requestId) { + public Mono> getPropertiesNoCustomHeadersWithResponseAsync(Integer timeout, + String requestId) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getPropertiesNoCustomHeaders( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getPropertiesNoCustomHeaders(this.client.getUrl(), restype, comp, + timeout, this.client.getVersion(), requestId, accept, context)); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS - * (Cross-Origin Resource Sharing) rules along with {@link Response} on successful completion of {@link Mono}. + * (Cross-Origin Resource Sharing) rules along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesNoCustomHeadersWithResponseAsync( - Integer timeout, String requestId, Context context) { + public Mono> getPropertiesNoCustomHeadersWithResponseAsync(Integer timeout, + String requestId, Context context) { final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.getPropertiesNoCustomHeaders( - this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); + return service.getPropertiesNoCustomHeaders(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(Integer timeout, + String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceProperties getProperties(Integer timeout, String requestId) { + return getPropertiesWithResponse(timeout, requestId, Context.NONE).getValue(); + } + + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + final String restype = "service"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return stats for the storage service along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getStatisticsWithResponseAsync( - Integer timeout, String requestId) { + public Mono> + getStatisticsWithResponseAsync(Integer timeout, String requestId) { final String restype = "service"; final String comp = "stats"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getStatistics( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getStatistics(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context)); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -757,24 +906,24 @@ public Mono> g * @return stats for the storage service along with {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getStatisticsWithResponseAsync( - Integer timeout, String requestId, Context context) { + public Mono> + getStatisticsWithResponseAsync(Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "stats"; final String accept = "application/xml"; - return service.getStatistics( - this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); + return service.getStatistics(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, + accept, context); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -788,12 +937,12 @@ public Mono getStatisticsAsync(Integer timeout, String re /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -803,51 +952,42 @@ public Mono getStatisticsAsync(Integer timeout, String re @ServiceMethod(returns = ReturnType.SINGLE) public Mono getStatisticsAsync(Integer timeout, String requestId, Context context) { return getStatisticsWithResponseAsync(timeout, requestId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return stats for the storage service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getStatisticsNoCustomHeadersWithResponseAsync( - Integer timeout, String requestId) { + public Mono> getStatisticsNoCustomHeadersWithResponseAsync(Integer timeout, + String requestId) { final String restype = "service"; final String comp = "stats"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getStatisticsNoCustomHeaders( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getStatisticsNoCustomHeaders(this.client.getUrl(), restype, comp, + timeout, this.client.getVersion(), requestId, accept, context)); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -855,103 +995,150 @@ public Mono> getStatisticsNoCustomHeadersWithRes * @return stats for the storage service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getStatisticsNoCustomHeadersWithResponseAsync( - Integer timeout, String requestId, Context context) { + public Mono> getStatisticsNoCustomHeadersWithResponseAsync(Integer timeout, + String requestId, Context context) { final String restype = "service"; final String comp = "stats"; final String accept = "application/xml"; - return service.getStatisticsNoCustomHeaders( - this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); + return service.getStatisticsNoCustomHeaders(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the storage service along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getStatisticsWithResponse(Integer timeout, + String requestId, Context context) { + final String restype = "service"; + final String comp = "stats"; + final String accept = "application/xml"; + return service.getStatisticsSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the storage service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { + return getStatisticsWithResponse(timeout, requestId, Context.NONE).getValue(); + } + + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the storage account. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the storage service along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStatisticsNoCustomHeadersWithResponse(Integer timeout, String requestId, + Context context) { + final String restype = "service"; + final String comp = "stats"; + final String accept = "application/xml"; + return service.getStatisticsNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobContainersSegmentSinglePageAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId) { + public Mono> listBlobContainersSegmentSinglePageAsync(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId) { final String comp = "list"; final String accept = "application/xml"; - String listBlobContainersIncludeTypeConverted = - (listBlobContainersIncludeType == null) - ? null - : listBlobContainersIncludeType.stream() - .map(value -> Objects.toString(value, "")) - .collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.listBlobContainersSegment( - this.client.getUrl(), - comp, - prefix, - marker, - maxresults, - listBlobContainersIncludeTypeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - res.getDeserializedHeaders())); + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.listBlobContainersSegment(this.client.getUrl(), comp, prefix, marker, + maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, + accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders())); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -959,107 +1146,241 @@ public Mono> listBlobContainersSegmentSinglePag * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobContainersSegmentSinglePageAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId, - Context context) { + public Mono> listBlobContainersSegmentSinglePageAsync(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId, Context context) { final String comp = "list"; final String accept = "application/xml"; - String listBlobContainersIncludeTypeConverted = - (listBlobContainersIncludeType == null) - ? null - : listBlobContainersIncludeType.stream() - .map(value -> Objects.toString(value, "")) - .collect(Collectors.joining(",")); - return service.listBlobContainersSegment( - this.client.getUrl(), - comp, - prefix, - marker, - maxresults, - listBlobContainersIncludeTypeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - res.getDeserializedHeaders())); + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .listBlobContainersSegment(this.client.getUrl(), comp, prefix, marker, maxresults, + listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders())); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of containers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBlobContainersSegmentAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId) { + public PagedFlux listBlobContainersSegmentAsync(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId) { + return new PagedFlux<>(() -> listBlobContainersSegmentSinglePageAsync(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId), + nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId)); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBlobContainersSegmentAsync(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId, + Context context) { return new PagedFlux<>( - () -> - listBlobContainersSegmentSinglePageAsync( - prefix, marker, maxresults, listBlobContainersIncludeType, timeout, requestId), - nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId)); + () -> listBlobContainersSegmentSinglePageAsync(prefix, marker, maxresults, listBlobContainersIncludeType, + timeout, requestId, context), + nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId, context)); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBlobContainersSegmentNoCustomHeadersSinglePageAsync(String prefix, + String marker, Integer maxresults, List listBlobContainersIncludeType, + Integer timeout, String requestId) { + final String comp = "list"; + final String accept = "application/xml"; + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil + .withContext(context -> service.listBlobContainersSegmentNoCustomHeaders(this.client.getUrl(), comp, prefix, + marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), + requestId, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null)); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBlobContainersSegmentNoCustomHeadersSinglePageAsync(String prefix, + String marker, Integer maxresults, List listBlobContainersIncludeType, + Integer timeout, String requestId, Context context) { + final String comp = "list"; + final String accept = "application/xml"; + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service + .listBlobContainersSegmentNoCustomHeaders(this.client.getUrl(), comp, prefix, marker, maxresults, + listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null)); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBlobContainersSegmentNoCustomHeadersAsync(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId) { + return new PagedFlux<>( + () -> listBlobContainersSegmentNoCustomHeadersSinglePageAsync(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId), + nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId)); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1067,249 +1388,349 @@ public PagedFlux listBlobContainersSegmentAsync( * @return an enumeration of containers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBlobContainersSegmentAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId, - Context context) { - return new PagedFlux<>( - () -> - listBlobContainersSegmentSinglePageAsync( - prefix, marker, maxresults, listBlobContainersIncludeType, timeout, requestId, context), - nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId, context)); + public PagedFlux listBlobContainersSegmentNoCustomHeadersAsync(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId, Context context) { + return new PagedFlux<>( + () -> listBlobContainersSegmentNoCustomHeadersSinglePageAsync(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId, context), + nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId, context)); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentSinglePage(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId) { + final String comp = "list"; + final String accept = "application/xml"; + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + ResponseBase res + = service.listBlobContainersSegmentSync(this.client.getUrl(), comp, prefix, marker, maxresults, + listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, + Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentSinglePage(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId, Context context) { + final String comp = "list"; + final String accept = "application/xml"; + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + ResponseBase res + = service.listBlobContainersSegmentSync(this.client.getUrl(), comp, prefix, marker, maxresults, + listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId) { + return new PagedIterable<>( + () -> listBlobContainersSegmentSinglePage(prefix, marker, maxresults, listBlobContainersIncludeType, + timeout, requestId, Context.NONE), + nextLink -> listBlobContainersSegmentNextSinglePage(nextLink, requestId)); + } + + /** + * The List Containers Segment operation returns a list of the containers under the specified account. + * + * @param prefix Filters the results to return only containers whose name begins with the specified prefix. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned + * as part of the response body. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBlobContainersSegment(String prefix, String marker, Integer maxresults, + List listBlobContainersIncludeType, Integer timeout, String requestId, + Context context) { + return new PagedIterable<>( + () -> listBlobContainersSegmentSinglePage(prefix, marker, maxresults, listBlobContainersIncludeType, + timeout, requestId, context), + nextLink -> listBlobContainersSegmentNextSinglePage(nextLink, requestId, context)); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return an enumeration of containers along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobContainersSegmentNoCustomHeadersSinglePageAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId) { + public PagedResponse listBlobContainersSegmentNoCustomHeadersSinglePage(String prefix, + String marker, Integer maxresults, List listBlobContainersIncludeType, + Integer timeout, String requestId) { final String comp = "list"; final String accept = "application/xml"; - String listBlobContainersIncludeTypeConverted = - (listBlobContainersIncludeType == null) - ? null - : listBlobContainersIncludeType.stream() - .map(value -> Objects.toString(value, "")) - .collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.listBlobContainersSegmentNoCustomHeaders( - this.client.getUrl(), - comp, - prefix, - marker, - maxresults, - listBlobContainersIncludeTypeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - null)); + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listBlobContainersSegmentNoCustomHeadersSync(this.client.getUrl(), + comp, prefix, marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), + requestId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return an enumeration of containers along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobContainersSegmentNoCustomHeadersSinglePageAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId, - Context context) { + public PagedResponse listBlobContainersSegmentNoCustomHeadersSinglePage(String prefix, + String marker, Integer maxresults, List listBlobContainersIncludeType, + Integer timeout, String requestId, Context context) { final String comp = "list"; final String accept = "application/xml"; - String listBlobContainersIncludeTypeConverted = - (listBlobContainersIncludeType == null) - ? null - : listBlobContainersIncludeType.stream() - .map(value -> Objects.toString(value, "")) - .collect(Collectors.joining(",")); - return service.listBlobContainersSegmentNoCustomHeaders( - this.client.getUrl(), - comp, - prefix, - marker, - maxresults, - listBlobContainersIncludeTypeConverted, - timeout, - this.client.getVersion(), - requestId, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - null)); + String listBlobContainersIncludeTypeConverted = (listBlobContainersIncludeType == null) + ? null + : listBlobContainersIncludeType.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listBlobContainersSegmentNoCustomHeadersSync(this.client.getUrl(), + comp, prefix, marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), + requestId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers as paginated response with {@link PagedFlux}. + * @return an enumeration of containers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBlobContainersSegmentNoCustomHeadersAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId) { - return new PagedFlux<>( - () -> - listBlobContainersSegmentNoCustomHeadersSinglePageAsync( - prefix, marker, maxresults, listBlobContainersIncludeType, timeout, requestId), - nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId)); + public PagedIterable listBlobContainersSegmentNoCustomHeaders(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId) { + return new PagedIterable<>( + () -> listBlobContainersSegmentNoCustomHeadersSinglePage(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId, Context.NONE), + nextLink -> listBlobContainersSegmentNextSinglePage(nextLink, requestId)); } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param listBlobContainersIncludeType Include this parameter to specify that the container's metadata be returned - * as part of the response body. + * as part of the response body. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an enumeration of containers as paginated response with {@link PagedFlux}. + * @return an enumeration of containers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBlobContainersSegmentNoCustomHeadersAsync( - String prefix, - String marker, - Integer maxresults, - List listBlobContainersIncludeType, - Integer timeout, - String requestId, - Context context) { - return new PagedFlux<>( - () -> - listBlobContainersSegmentNoCustomHeadersSinglePageAsync( - prefix, marker, maxresults, listBlobContainersIncludeType, timeout, requestId, context), - nextLink -> listBlobContainersSegmentNextSinglePageAsync(nextLink, requestId, context)); + public PagedIterable listBlobContainersSegmentNoCustomHeaders(String prefix, String marker, + Integer maxresults, List listBlobContainersIncludeType, Integer timeout, + String requestId, Context context) { + return new PagedIterable<>( + () -> listBlobContainersSegmentNoCustomHeadersSinglePage(prefix, marker, maxresults, + listBlobContainersIncludeType, timeout, requestId, context), + nextLink -> listBlobContainersSegmentNextSinglePage(nextLink, requestId, context)); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1317,34 +1738,24 @@ public PagedFlux listBlobContainersSegmentNoCustomHeadersAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> - getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId) { + getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId) { final String restype = "service"; final String comp = "userdelegationkey"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getUserDelegationKey( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - keyInfo, - accept, - context)); + return FluxUtil.withContext(context -> service.getUserDelegationKey(this.client.getUrl(), restype, comp, + timeout, this.client.getVersion(), requestId, keyInfo, accept, context)); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1353,32 +1764,24 @@ public PagedFlux listBlobContainersSegmentNoCustomHeadersAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> - getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "userdelegationkey"; final String accept = "application/xml"; - return service.getUserDelegationKey( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - keyInfo, - accept, - context); + return service.getUserDelegationKey(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, keyInfo, accept, context); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1387,19 +1790,19 @@ public PagedFlux listBlobContainersSegmentNoCustomHeadersAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Mono getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId) { return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1407,57 +1810,47 @@ public Mono getUserDelegationKeyAsync(KeyInfo keyInfo, Intege * @return a user delegation key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUserDelegationKeyAsync( - KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + public Mono getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId, + Context context) { return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getUserDelegationKeyNoCustomHeadersWithResponseAsync( - KeyInfo keyInfo, Integer timeout, String requestId) { + public Mono> getUserDelegationKeyNoCustomHeadersWithResponseAsync(KeyInfo keyInfo, + Integer timeout, String requestId) { final String restype = "service"; final String comp = "userdelegationkey"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getUserDelegationKeyNoCustomHeaders( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - keyInfo, - accept, - context)); + return FluxUtil.withContext(context -> service.getUserDelegationKeyNoCustomHeaders(this.client.getUrl(), + restype, comp, timeout, this.client.getVersion(), requestId, keyInfo, accept, context)); } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1465,63 +1858,106 @@ public Mono> getUserDelegationKeyNoCustomHeadersWith * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getUserDelegationKeyNoCustomHeadersWithResponseAsync( - KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + public Mono> getUserDelegationKeyNoCustomHeadersWithResponseAsync(KeyInfo keyInfo, + Integer timeout, String requestId, Context context) { final String restype = "service"; final String comp = "userdelegationkey"; final String accept = "application/xml"; - return service.getUserDelegationKeyNoCustomHeaders( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - keyInfo, - accept, - context); + return service.getUserDelegationKeyNoCustomHeaders(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); } /** - * Returns the sku name and account kind. - * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeySync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, keyInfo, accept, context); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) { + return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, Context.NONE).getValue(); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user delegation key along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUserDelegationKeyNoCustomHeadersWithResponse(KeyInfo keyInfo, Integer timeout, + String requestId, Context context) { + final String restype = "service"; + final String comp = "userdelegationkey"; + final String accept = "application/xml"; + return service.getUserDelegationKeyNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync( - Integer timeout, String requestId) { + public Mono> getAccountInfoWithResponseAsync() { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccountInfo( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getAccountInfo(this.client.getUrl(), restype, comp, + this.client.getVersion(), accept, context)); } /** * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1529,41 +1965,28 @@ public Mono> getAccountInfoWit * @return the {@link ResponseBase} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync( - Integer timeout, String requestId, Context context) { + public Mono> getAccountInfoWithResponseAsync(Context context) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfo( - this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); + return service.getAccountInfo(this.client.getUrl(), restype, comp, this.client.getVersion(), accept, context); } /** * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccountInfoAsync(Integer timeout, String requestId) { - return getAccountInfoWithResponseAsync(timeout, requestId).flatMap(ignored -> Mono.empty()); + public Mono getAccountInfoAsync() { + return getAccountInfoWithResponseAsync().flatMap(ignored -> Mono.empty()); } /** * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1571,49 +1994,29 @@ public Mono getAccountInfoAsync(Integer timeout, String requestId) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccountInfoAsync(Integer timeout, String requestId, Context context) { - return getAccountInfoWithResponseAsync(timeout, requestId, context).flatMap(ignored -> Mono.empty()); + public Mono getAccountInfoAsync(Context context) { + return getAccountInfoWithResponseAsync(context).flatMap(ignored -> Mono.empty()); } /** * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Integer timeout, String requestId) { + public Mono> getAccountInfoNoCustomHeadersWithResponseAsync() { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.getAccountInfoNoCustomHeaders( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - accept, - context)); + return FluxUtil.withContext(context -> service.getAccountInfoNoCustomHeaders(this.client.getUrl(), restype, + comp, this.client.getVersion(), accept, context)); } /** * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1621,27 +2024,73 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Integ * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( - Integer timeout, String requestId, Context context) { + public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Context context) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getAccountInfoNoCustomHeaders(this.client.getUrl(), restype, comp, this.client.getVersion(), + accept, context); + } + + /** + * Returns the sku name and account kind. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getAccountInfoWithResponse(Context context) { + final String restype = "account"; + final String comp = "properties"; + final String accept = "application/xml"; + return service.getAccountInfoSync(this.client.getUrl(), restype, comp, this.client.getVersion(), accept, + context); + } + + /** + * Returns the sku name and account kind. + * + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo() { + getAccountInfoWithResponse(Context.NONE); + } + + /** + * Returns the sku name and account kind. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAccountInfoNoCustomHeadersWithResponse(Context context) { final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeaders( - this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, context); + return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), restype, comp, this.client.getVersion(), + accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1649,36 +2098,25 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - long contentLength, String multipartContentType, Flux body, Integer timeout, String requestId) { + long contentLength, String multipartContentType, Flux body, Integer timeout, String requestId) { final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatch( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatch(this.client.getUrl(), comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1687,63 +2125,50 @@ public Mono>> submitBa */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId, - Context context) { + long contentLength, String multipartContentType, Flux body, Integer timeout, String requestId, + Context context) { final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatch( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatch(this.client.getUrl(), comp, contentLength, multipartContentType, timeout, + this.client.getVersion(), requestId, body, accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - long contentLength, String multipartContentType, Flux body, Integer timeout, String requestId) { + public Flux submitBatchAsync(long contentLength, String multipartContentType, Flux body, + Integer timeout, String requestId) { return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1751,66 +2176,50 @@ public Flux submitBatchAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId, - Context context) { + public Flux submitBatchAsync(long contentLength, String multipartContentType, Flux body, + Integer timeout, String requestId, Context context) { return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId, context) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - long contentLength, String multipartContentType, Flux body, Integer timeout, String requestId) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(long contentLength, + String multipartContentType, Flux body, Integer timeout, String requestId) { final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatchNoCustomHeaders( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatchNoCustomHeaders(this.client.getUrl(), comp, + contentLength, multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1818,40 +2227,26 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - long contentLength, - String multipartContentType, - Flux body, - Integer timeout, - String requestId, - Context context) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(long contentLength, + String multipartContentType, Flux body, Integer timeout, String requestId, Context context) { final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchNoCustomHeaders( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatchNoCustomHeaders(this.client.getUrl(), comp, contentLength, multipartContentType, + timeout, this.client.getVersion(), requestId, body, accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1859,36 +2254,25 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { + long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatch( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatch(this.client.getUrl(), comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1897,63 +2281,50 @@ public Mono>> submitBa */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> submitBatchWithResponseAsync( - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId, - Context context) { + long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId, + Context context) { final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatch( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatch(this.client.getUrl(), comp, contentLength, multipartContentType, timeout, + this.client.getVersion(), requestId, body, accept, context); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { + public Flux submitBatchAsync(long contentLength, String multipartContentType, BinaryData body, + Integer timeout, String requestId) { return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -1961,66 +2332,50 @@ public Flux submitBatchAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Flux submitBatchAsync( - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId, - Context context) { + public Flux submitBatchAsync(long contentLength, String multipartContentType, BinaryData body, + Integer timeout, String requestId, Context context) { return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId, context) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId) { final String comp = "batch"; final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.submitBatchNoCustomHeaders( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context)); + return FluxUtil.withContext(context -> service.submitBatchNoCustomHeaders(this.client.getUrl(), comp, + contentLength, multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context)); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. - * Example header value: multipart/mixed; boundary=batch_<GUID>. + * Example header value: multipart/mixed; boundary=batch_<GUID>. * @param body Initial data. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2028,165 +2383,200 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono submitBatchNoCustomHeadersWithResponseAsync( - long contentLength, - String multipartContentType, - BinaryData body, - Integer timeout, - String requestId, - Context context) { + public Mono submitBatchNoCustomHeadersWithResponseAsync(long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchNoCustomHeaders(this.client.getUrl(), comp, contentLength, multipartContentType, + timeout, this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link ResponseBase}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase submitBatchWithResponse(long contentLength, + String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { + final String comp = "batch"; + final String accept = "application/xml"; + return service.submitBatchSync(this.client.getUrl(), comp, contentLength, multipartContentType, timeout, + this.client.getVersion(), requestId, body, accept, context); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream submitBatch(long contentLength, String multipartContentType, BinaryData body, Integer timeout, + String requestId) { + return submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, Context.NONE) + .getValue(); + } + + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. + * Example header value: multipart/mixed; boundary=batch_<GUID>. + * @param body Initial data. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response submitBatchNoCustomHeadersWithResponse(long contentLength, String multipartContentType, + BinaryData body, Integer timeout, String requestId, Context context) { final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchNoCustomHeaders( - this.client.getUrl(), - comp, - contentLength, - multipartContentType, - timeout, - this.client.getVersion(), - requestId, - body, - accept, - context); + return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), comp, contentLength, multipartContentType, + timeout, this.client.getVersion(), requestId, body, accept, context); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> filterBlobsWithResponseAsync( - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include) { + Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include) { final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.filterBlobs( - this.client.getUrl(), - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context)); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil.withContext(context -> service.filterBlobs(this.client.getUrl(), comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context)); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link ResponseBase} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> filterBlobsWithResponseAsync( - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include, - Context context) { + Integer timeout, String requestId, String where, String marker, Integer maxresults, + List include, Context context) { final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.filterBlobs( - this.client.getUrl(), - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobs(this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, where, + marker, maxresults, includeConverted, accept, context); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2194,38 +2584,33 @@ public Mono> filterB * @return the result of a Filter Blobs API call on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono filterBlobsAsync( - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include) { + public Mono filterBlobsAsync(Integer timeout, String requestId, String where, String marker, + Integer maxresults, List include) { return filterBlobsWithResponseAsync(timeout, requestId, where, marker, maxresults, include) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2234,177 +2619,248 @@ public Mono filterBlobsAsync( * @return the result of a Filter Blobs API call on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono filterBlobsAsync( - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include, - Context context) { + public Mono filterBlobsAsync(Integer timeout, String requestId, String where, String marker, + Integer maxresults, List include, Context context) { return filterBlobsWithResponseAsync(timeout, requestId, where, marker, maxresults, include, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> filterBlobsNoCustomHeadersWithResponseAsync(Integer timeout, + String requestId, String where, String marker, Integer maxresults, List include) { + final String comp = "blobs"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return FluxUtil.withContext(context -> service.filterBlobsNoCustomHeaders(this.client.getUrl(), comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context)); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> filterBlobsNoCustomHeadersWithResponseAsync(Integer timeout, + String requestId, String where, String marker, Integer maxresults, List include, + Context context) { + final String comp = "blobs"; + final String accept = "application/xml"; + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsNoCustomHeaders(this.client.getUrl(), comp, timeout, this.client.getVersion(), + requestId, where, marker, maxresults, includeConverted, accept, context); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link ResponseBase}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsNoCustomHeadersWithResponseAsync( - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include) { + public ResponseBase filterBlobsWithResponse(Integer timeout, + String requestId, String where, String marker, Integer maxresults, List include, + Context context) { final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return FluxUtil.withContext( - context -> - service.filterBlobsNoCustomHeaders( - this.client.getUrl(), - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context)); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, where, + marker, maxresults, includeConverted, accept, context); + } + + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search + * expression. Filter blobs searches across all containers within a storage account but can be scoped within the + * expression to a single container. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param where Filters the results to return only to return only blobs whose tags match the specified expression. + * @param marker A string value that identifies the portion of the list of containers to be returned with the next + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. + * @param maxresults Specifies the maximum number of containers to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. + * @param include Include this parameter to specify one or more datasets to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a Filter Blobs API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String where, String marker, + Integer maxresults, List include) { + return filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, Context.NONE).getValue(); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. + * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting + * Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param where Filters the results to return only to return only blobs whose tags match the specified expression. * @param marker A string value that identifies the portion of the list of containers to be returned with the next - * listing operation. The operation returns the NextMarker value within the response body if the listing - * operation did not return all containers remaining to be listed with the current page. The NextMarker value - * can be used as the value for the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. + * listing operation. The operation returns the NextMarker value within the response body if the listing operation + * did not return all containers remaining to be listed with the current page. The NextMarker value can be used as + * the value for the marker parameter in a subsequent call to request the next page of list items. The marker value + * is opaque to the client. * @param maxresults Specifies the maximum number of containers to return. If the request does not specify - * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the - * listing operation crosses a partition boundary, then the service will return a continuation token for - * retrieving the remainder of the results. For this reason, it is possible that the service will return fewer - * results than specified by maxresults, or than the default of 5000. + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the + * listing operation crosses a partition boundary, then the service will return a continuation token for retrieving + * the remainder of the results. For this reason, it is possible that the service will return fewer results than + * specified by maxresults, or than the default of 5000. * @param include Include this parameter to specify one or more datasets to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a Filter Blobs API call along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of a Filter Blobs API call along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsNoCustomHeadersWithResponseAsync( - Integer timeout, - String requestId, - String where, - String marker, - Integer maxresults, - List include, - Context context) { + public Response filterBlobsNoCustomHeadersWithResponse(Integer timeout, String requestId, + String where, String marker, Integer maxresults, List include, Context context) { final String comp = "blobs"; final String accept = "application/xml"; - String includeConverted = - (include == null) - ? null - : include.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return service.filterBlobsNoCustomHeaders( - this.client.getUrl(), - comp, - timeout, - this.client.getVersion(), - requestId, - where, - marker, - maxresults, - includeConverted, - accept, - context); + String includeConverted = (include == null) + ? null + : include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), + requestId, where, marker, maxresults, includeConverted, accept, context); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobContainersSegmentNextSinglePageAsync( - String nextLink, String requestId) { + public Mono> listBlobContainersSegmentNextSinglePageAsync(String nextLink, + String requestId) { final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.listBlobContainersSegmentNext( - nextLink, - this.client.getUrl(), - this.client.getVersion(), - requestId, - accept, - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - res.getDeserializedHeaders())); + return FluxUtil + .withContext(context -> service.listBlobContainersSegmentNext(nextLink, this.client.getUrl(), + this.client.getVersion(), requestId, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2412,65 +2868,48 @@ public Mono> listBlobContainersSegmentNextSingl * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobContainersSegmentNextSinglePageAsync( - String nextLink, String requestId, Context context) { + public Mono> listBlobContainersSegmentNextSinglePageAsync(String nextLink, + String requestId, Context context) { final String accept = "application/xml"; - return service.listBlobContainersSegmentNext( - nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - res.getDeserializedHeaders())); + return service + .listBlobContainersSegmentNext(nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an enumeration of containers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobContainersSegmentNextNoCustomHeadersSinglePageAsync( - String nextLink, String requestId) { + public Mono> + listBlobContainersSegmentNextNoCustomHeadersSinglePageAsync(String nextLink, String requestId) { final String accept = "application/xml"; - return FluxUtil.withContext( - context -> - service.listBlobContainersSegmentNextNoCustomHeaders( - nextLink, - this.client.getUrl(), - this.client.getVersion(), - requestId, - accept, - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - null)); + return FluxUtil + .withContext(context -> service.listBlobContainersSegmentNextNoCustomHeaders(nextLink, this.client.getUrl(), + this.client.getVersion(), requestId, accept, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when storage analytics logging is enabled. + * analytics logs when storage analytics logging is enabled. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageException thrown if the request is rejected by server. @@ -2479,18 +2918,107 @@ public Mono> listBlobContainersSegmentNextNoCus */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listBlobContainersSegmentNextNoCustomHeadersSinglePageAsync( - String nextLink, String requestId, Context context) { + String nextLink, String requestId, Context context) { + final String accept = "application/xml"; + return service + .listBlobContainersSegmentNextNoCustomHeaders(nextLink, this.client.getUrl(), this.client.getVersion(), + requestId, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentNextSinglePage(String nextLink, String requestId) { + final String accept = "application/xml"; + ResponseBase res + = service.listBlobContainersSegmentNextSync(nextLink, this.client.getUrl(), this.client.getVersion(), + requestId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentNextSinglePage(String nextLink, String requestId, + Context context) { + final String accept = "application/xml"; + ResponseBase res + = service.listBlobContainersSegmentNextSync(nextLink, this.client.getUrl(), this.client.getVersion(), + requestId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentNextNoCustomHeadersSinglePage(String nextLink, + String requestId) { + final String accept = "application/xml"; + Response res = service.listBlobContainersSegmentNextNoCustomHeadersSync(nextLink, + this.client.getUrl(), this.client.getVersion(), requestId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when storage analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an enumeration of containers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listBlobContainersSegmentNextNoCustomHeadersSinglePage(String nextLink, + String requestId, Context context) { final String accept = "application/xml"; - return service.listBlobContainersSegmentNextNoCustomHeaders( - nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().getBlobContainerItems(), - res.getValue().getNextMarker(), - null)); + Response res = service.listBlobContainersSegmentNextNoCustomHeadersSync(nextLink, + this.client.getUrl(), this.client.getVersion(), requestId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java index 897908b55a630..097459ec50dc5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java @@ -9,101 +9,86 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The AppendBlobsAppendBlockFromUrlHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The AppendBlobsAppendBlockFromUrlHeaders model. + */ @Fluent public final class AppendBlobsAppendBlockFromUrlHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-blob-committed-block-count property. */ - @JsonProperty(value = "x-ms-blob-committed-block-count") private Integer xMsBlobCommittedBlockCount; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-blob-append-offset property. */ - @JsonProperty(value = "x-ms-blob-append-offset") private String xMsBlobAppendOffset; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = - HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_BLOB_APPEND_OFFSET = HttpHeaderName.fromString("x-ms-blob-append-offset"); @@ -112,7 +97,7 @@ public final class AppendBlobsAppendBlockFromUrlHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsAppendBlockFromUrlHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { @@ -131,7 +116,7 @@ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -150,7 +135,7 @@ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -159,7 +144,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -170,7 +155,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -179,7 +164,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -190,7 +175,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -199,7 +184,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -210,7 +195,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsContentCrc64(byte[] xMsContent /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -219,7 +204,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -230,7 +215,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobCommittedBlockCount(Intege /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -242,7 +227,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -257,7 +242,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setLastModified(OffsetDateTime lastM /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -266,7 +251,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -277,7 +262,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsEncryptionKeySha256(String xMs /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -286,7 +271,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -297,7 +282,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -306,7 +291,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -317,7 +302,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestServerEncrypted(Boolean /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -329,7 +314,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -344,7 +329,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -353,7 +338,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -364,7 +349,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @return the xMsBlobAppendOffset value. */ public String getXMsBlobAppendOffset() { @@ -373,7 +358,7 @@ public String getXMsBlobAppendOffset() { /** * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ @@ -384,7 +369,7 @@ public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobAppendOffset(String xMsBlo /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -393,7 +378,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java index 0a7872ba8a36c..af414afd06f63 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java @@ -9,107 +9,91 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The AppendBlobsAppendBlockHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The AppendBlobsAppendBlockHeaders model. + */ @Fluent public final class AppendBlobsAppendBlockHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-blob-committed-block-count property. */ - @JsonProperty(value = "x-ms-blob-committed-block-count") private Integer xMsBlobCommittedBlockCount; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The x-ms-blob-append-offset property. */ - @JsonProperty(value = "x-ms-blob-append-offset") private String xMsBlobAppendOffset; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = - HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_BLOB_APPEND_OFFSET = HttpHeaderName.fromString("x-ms-blob-append-offset"); @@ -118,7 +102,7 @@ public final class AppendBlobsAppendBlockHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsAppendBlockHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { @@ -149,7 +133,7 @@ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { this.contentMD5 = Base64.getDecoder().decode(contentMD5); } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); this.xMsBlobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); @@ -157,7 +141,7 @@ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -166,7 +150,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -177,7 +161,7 @@ public AppendBlobsAppendBlockHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -186,7 +170,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -197,7 +181,7 @@ public AppendBlobsAppendBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -206,7 +190,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -217,7 +201,7 @@ public AppendBlobsAppendBlockHeaders setXMsBlobCommittedBlockCount(Integer xMsBl /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -229,7 +213,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -244,7 +228,7 @@ public AppendBlobsAppendBlockHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -253,7 +237,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -264,7 +248,7 @@ public AppendBlobsAppendBlockHeaders setXMsEncryptionKeySha256(String xMsEncrypt /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -273,7 +257,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -284,7 +268,7 @@ public AppendBlobsAppendBlockHeaders setXMsRequestServerEncrypted(Boolean xMsReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -296,7 +280,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -311,7 +295,7 @@ public AppendBlobsAppendBlockHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -320,7 +304,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -331,7 +315,7 @@ public AppendBlobsAppendBlockHeaders setContentMD5(byte[] contentMD5) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -340,7 +324,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -351,7 +335,7 @@ public AppendBlobsAppendBlockHeaders setETag(String eTag) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -360,7 +344,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -371,7 +355,7 @@ public AppendBlobsAppendBlockHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -380,7 +364,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -391,7 +375,7 @@ public AppendBlobsAppendBlockHeaders setXMsClientRequestId(String xMsClientReque /** * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @return the xMsBlobAppendOffset value. */ public String getXMsBlobAppendOffset() { @@ -400,7 +384,7 @@ public String getXMsBlobAppendOffset() { /** * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * + * * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ @@ -411,7 +395,7 @@ public AppendBlobsAppendBlockHeaders setXMsBlobAppendOffset(String xMsBlobAppend /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -420,7 +404,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsAppendBlockHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java index b154012dafb32..9553c9589d1e8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java @@ -9,99 +9,85 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The AppendBlobsCreateHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The AppendBlobsCreateHeaders model. + */ @Fluent public final class AppendBlobsCreateHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { @@ -113,7 +99,7 @@ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -132,7 +118,7 @@ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -141,7 +127,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -152,7 +138,7 @@ public AppendBlobsCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -161,7 +147,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -172,7 +158,7 @@ public AppendBlobsCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -184,7 +170,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -199,7 +185,7 @@ public AppendBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -208,7 +194,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -219,7 +205,7 @@ public AppendBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -228,7 +214,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -239,7 +225,7 @@ public AppendBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKe /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -248,7 +234,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -259,7 +245,7 @@ public AppendBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -268,7 +254,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -279,7 +265,7 @@ public AppendBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestS /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -288,7 +274,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -299,7 +285,7 @@ public AppendBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -311,7 +297,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -326,7 +312,7 @@ public AppendBlobsCreateHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -335,7 +321,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the AppendBlobsCreateHeaders object itself. */ @@ -346,7 +332,7 @@ public AppendBlobsCreateHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -355,7 +341,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the AppendBlobsCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java index ea9e78ee3a75a..ba6caa84b16ac 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The AppendBlobsSealHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The AppendBlobsSealHeaders model. + */ @Fluent public final class AppendBlobsSealHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-blob-sealed property. */ - @JsonProperty(value = "x-ms-blob-sealed") private Boolean xMsBlobSealed; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_BLOB_SEALED = HttpHeaderName.fromString("x-ms-blob-sealed"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsSealHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { @@ -81,7 +71,7 @@ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -91,7 +81,7 @@ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -100,7 +90,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -111,7 +101,7 @@ public AppendBlobsSealHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -120,7 +110,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -131,7 +121,7 @@ public AppendBlobsSealHeaders setETag(String eTag) { /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -140,7 +130,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -151,7 +141,7 @@ public AppendBlobsSealHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -163,7 +153,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -178,7 +168,7 @@ public AppendBlobsSealHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -187,7 +177,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -198,7 +188,7 @@ public AppendBlobsSealHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -207,7 +197,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the AppendBlobsSealHeaders object itself. */ @@ -218,7 +208,7 @@ public AppendBlobsSealHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -230,7 +220,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the AppendBlobsSealHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java index c7cee78600d7e..1c5557e4d0106 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java @@ -5,56 +5,123 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Groups the settings used for formatting the response if the response should be Arrow formatted. */ -@JacksonXmlRootElement(localName = "ArrowConfiguration") +/** + * Groups the settings used for formatting the response if the response should be Arrow formatted. + */ @Fluent -public final class ArrowConfiguration { - private static final class SchemaWrapper { - @JacksonXmlProperty(localName = "Field") - private final List items; - - @JsonCreator - private SchemaWrapper(@JacksonXmlProperty(localName = "Field") List items) { - this.items = items; - } - } - +public final class ArrowConfiguration implements XmlSerializable { /* * The Schema property. */ - @JsonProperty(value = "Schema", required = true) - private SchemaWrapper schema; + private List schema; - /** Creates an instance of ArrowConfiguration class. */ - public ArrowConfiguration() {} + /** + * Creates an instance of ArrowConfiguration class. + */ + public ArrowConfiguration() { + } /** * Get the schema property: The Schema property. - * + * * @return the schema value. */ public List getSchema() { if (this.schema == null) { - this.schema = new SchemaWrapper(new ArrayList()); + this.schema = new ArrayList<>(); } - return this.schema.items; + return this.schema; } /** * Set the schema property: The Schema property. - * + * * @param schema the schema value to set. * @return the ArrowConfiguration object itself. */ public ArrowConfiguration setSchema(List schema) { - this.schema = new SchemaWrapper(schema); + this.schema = schema; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ArrowConfiguration" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.schema != null) { + xmlWriter.writeStartElement("Schema"); + for (ArrowField element : this.schema) { + xmlWriter.writeXml(element, "Field"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ArrowConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ArrowConfiguration if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ArrowConfiguration. + */ + public static ArrowConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ArrowConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ArrowConfiguration if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ArrowConfiguration. + */ + public static ArrowConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ArrowConfiguration" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ArrowConfiguration deserializedArrowConfiguration = new ArrowConfiguration(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Schema".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Field".equals(elementName.getLocalPart())) { + if (deserializedArrowConfiguration.schema == null) { + deserializedArrowConfiguration.schema = new ArrayList<>(); + } + deserializedArrowConfiguration.schema.add(ArrowField.fromXml(reader, "Field")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedArrowConfiguration; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java index 1e47714d21705..2ac0fe7e522a4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java @@ -5,43 +5,48 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Groups settings regarding specific field of an arrow schema. */ -@JacksonXmlRootElement(localName = "Field") +/** + * Groups settings regarding specific field of an arrow schema. + */ @Fluent -public final class ArrowField { +public final class ArrowField implements XmlSerializable { /* * The Type property. */ - @JsonProperty(value = "Type", required = true) private String type; /* * The Name property. */ - @JsonProperty(value = "Name") private String name; /* * The Precision property. */ - @JsonProperty(value = "Precision") private Integer precision; /* * The Scale property. */ - @JsonProperty(value = "Scale") private Integer scale; - /** Creates an instance of ArrowField class. */ - public ArrowField() {} + /** + * Creates an instance of ArrowField class. + */ + public ArrowField() { + } /** * Get the type property: The Type property. - * + * * @return the type value. */ public String getType() { @@ -50,7 +55,7 @@ public String getType() { /** * Set the type property: The Type property. - * + * * @param type the type value to set. * @return the ArrowField object itself. */ @@ -61,7 +66,7 @@ public ArrowField setType(String type) { /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -70,7 +75,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the ArrowField object itself. */ @@ -81,7 +86,7 @@ public ArrowField setName(String name) { /** * Get the precision property: The Precision property. - * + * * @return the precision value. */ public Integer getPrecision() { @@ -90,7 +95,7 @@ public Integer getPrecision() { /** * Set the precision property: The Precision property. - * + * * @param precision the precision value to set. * @return the ArrowField object itself. */ @@ -101,7 +106,7 @@ public ArrowField setPrecision(Integer precision) { /** * Get the scale property: The Scale property. - * + * * @return the scale value. */ public Integer getScale() { @@ -110,7 +115,7 @@ public Integer getScale() { /** * Set the scale property: The Scale property. - * + * * @param scale the scale value to set. * @return the ArrowField object itself. */ @@ -118,4 +123,68 @@ public ArrowField setScale(Integer scale) { this.scale = scale; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Field" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Type", this.type); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeNumberElement("Precision", this.precision); + xmlWriter.writeNumberElement("Scale", this.scale); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ArrowField from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ArrowField if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ArrowField. + */ + public static ArrowField fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ArrowField from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ArrowField if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ArrowField. + */ + public static ArrowField fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Field" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ArrowField deserializedArrowField = new ArrowField(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Type".equals(elementName.getLocalPart())) { + deserializedArrowField.type = reader.getStringElement(); + } else if ("Name".equals(elementName.getLocalPart())) { + deserializedArrowField.name = reader.getStringElement(); + } else if ("Precision".equals(elementName.getLocalPart())) { + deserializedArrowField.precision = reader.getNullableElement(Integer::parseInt); + } else if ("Scale".equals(elementName.getLocalPart())) { + deserializedArrowField.scale = reader.getNullableElement(Integer::parseInt); + } else { + reader.skipElement(); + } + } + + return deserializedArrowField; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java index 295b12918a1d4..5aed31c08f29c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java @@ -5,70 +5,61 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.storage.blob.models.BlobContainerItem; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** An enumeration of containers. */ -@JacksonXmlRootElement(localName = "EnumerationResults") +/** + * An enumeration of containers. + */ @Fluent -public final class BlobContainersSegment { +public final class BlobContainersSegment implements XmlSerializable { /* * The ServiceEndpoint property. */ - @JacksonXmlProperty(localName = "ServiceEndpoint", isAttribute = true) private String serviceEndpoint; /* * The Prefix property. */ - @JsonProperty(value = "Prefix") private String prefix; /* * The Marker property. */ - @JsonProperty(value = "Marker") private String marker; /* * The MaxResults property. */ - @JsonProperty(value = "MaxResults") private Integer maxResults; /* * The NextMarker property. */ - @JsonProperty(value = "NextMarker", required = true) private String nextMarker; - private static final class ContainersWrapper { - @JacksonXmlProperty(localName = "Container") - private final List items; - - @JsonCreator - private ContainersWrapper(@JacksonXmlProperty(localName = "Container") List items) { - this.items = items; - } - } - /* * The BlobContainerItems property. */ - @JsonProperty(value = "Containers") - private ContainersWrapper blobContainerItems; + private List blobContainerItems; - /** Creates an instance of BlobContainersSegment class. */ - public BlobContainersSegment() {} + /** + * Creates an instance of BlobContainersSegment class. + */ + public BlobContainersSegment() { + } /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -77,7 +68,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the BlobContainersSegment object itself. */ @@ -88,7 +79,7 @@ public BlobContainersSegment setServiceEndpoint(String serviceEndpoint) { /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -97,7 +88,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the BlobContainersSegment object itself. */ @@ -108,7 +99,7 @@ public BlobContainersSegment setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -117,7 +108,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the BlobContainersSegment object itself. */ @@ -128,7 +119,7 @@ public BlobContainersSegment setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public Integer getMaxResults() { @@ -137,7 +128,7 @@ public Integer getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the BlobContainersSegment object itself. */ @@ -148,7 +139,7 @@ public BlobContainersSegment setMaxResults(Integer maxResults) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -157,7 +148,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the BlobContainersSegment object itself. */ @@ -168,24 +159,110 @@ public BlobContainersSegment setNextMarker(String nextMarker) { /** * Get the blobContainerItems property: The BlobContainerItems property. - * + * * @return the blobContainerItems value. */ public List getBlobContainerItems() { if (this.blobContainerItems == null) { - this.blobContainerItems = new ContainersWrapper(new ArrayList()); + this.blobContainerItems = new ArrayList<>(); } - return this.blobContainerItems.items; + return this.blobContainerItems; } /** * Set the blobContainerItems property: The BlobContainerItems property. - * + * * @param blobContainerItems the blobContainerItems value to set. * @return the BlobContainersSegment object itself. */ public BlobContainersSegment setBlobContainerItems(List blobContainerItems) { - this.blobContainerItems = new ContainersWrapper(blobContainerItems); + this.blobContainerItems = blobContainerItems; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringElement("Prefix", this.prefix); + xmlWriter.writeStringElement("Marker", this.marker); + xmlWriter.writeNumberElement("MaxResults", this.maxResults); + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + if (this.blobContainerItems != null) { + xmlWriter.writeStartElement("Containers"); + for (BlobContainerItem element : this.blobContainerItems) { + xmlWriter.writeXml(element, "Container"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobContainersSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobContainersSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobContainersSegment. + */ + public static BlobContainersSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobContainersSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobContainersSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobContainersSegment. + */ + public static BlobContainersSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobContainersSegment deserializedBlobContainersSegment = new BlobContainersSegment(); + deserializedBlobContainersSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Prefix".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.prefix = reader.getStringElement(); + } else if ("Marker".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.marker = reader.getStringElement(); + } else if ("MaxResults".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.maxResults = reader.getNullableElement(Integer::parseInt); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedBlobContainersSegment.nextMarker = reader.getStringElement(); + } else if ("Containers".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Container".equals(elementName.getLocalPart())) { + if (deserializedBlobContainersSegment.blobContainerItems == null) { + deserializedBlobContainersSegment.blobContainerItems = new ArrayList<>(); + } + deserializedBlobContainersSegment.blobContainerItems + .add(BlobContainerItem.fromXml(reader, "Container")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedBlobContainersSegment; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java index 513625f8ce7c0..692b452f63622 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java @@ -5,36 +5,39 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BlobDeleteType. */ +/** + * Defines values for BlobDeleteType. + */ public final class BlobDeleteType extends ExpandableStringEnum { - /** Static value Permanent for BlobDeleteType. */ + /** + * Static value Permanent for BlobDeleteType. + */ public static final BlobDeleteType PERMANENT = fromString("Permanent"); /** * Creates a new instance of BlobDeleteType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public BlobDeleteType() {} + public BlobDeleteType() { + } /** * Creates or finds a BlobDeleteType from its string representation. - * + * * @param name a name to look for. * @return the corresponding BlobDeleteType. */ - @JsonCreator public static BlobDeleteType fromString(String name) { return fromString(name, BlobDeleteType.class); } /** * Gets known BlobDeleteType values. - * + * * @return known BlobDeleteType values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java index abc5721139395..adece5bc410e5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java @@ -5,45 +5,54 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BlobExpiryOptions. */ +/** + * Defines values for BlobExpiryOptions. + */ public final class BlobExpiryOptions extends ExpandableStringEnum { - /** Static value NeverExpire for BlobExpiryOptions. */ + /** + * Static value NeverExpire for BlobExpiryOptions. + */ public static final BlobExpiryOptions NEVER_EXPIRE = fromString("NeverExpire"); - /** Static value RelativeToCreation for BlobExpiryOptions. */ + /** + * Static value RelativeToCreation for BlobExpiryOptions. + */ public static final BlobExpiryOptions RELATIVE_TO_CREATION = fromString("RelativeToCreation"); - /** Static value RelativeToNow for BlobExpiryOptions. */ + /** + * Static value RelativeToNow for BlobExpiryOptions. + */ public static final BlobExpiryOptions RELATIVE_TO_NOW = fromString("RelativeToNow"); - /** Static value Absolute for BlobExpiryOptions. */ + /** + * Static value Absolute for BlobExpiryOptions. + */ public static final BlobExpiryOptions ABSOLUTE = fromString("Absolute"); /** * Creates a new instance of BlobExpiryOptions value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public BlobExpiryOptions() {} + public BlobExpiryOptions() { + } /** * Creates or finds a BlobExpiryOptions from its string representation. - * + * * @param name a name to look for. * @return the corresponding BlobExpiryOptions. */ - @JsonCreator public static BlobExpiryOptions fromString(String name) { return fromString(name, BlobExpiryOptions.class); } /** * Gets known BlobExpiryOptions values. - * + * * @return known BlobExpiryOptions values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java index 5fe6467212ac2..54b86990ec396 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java @@ -1,27 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. - package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The BlobFlatListSegment model. */ -@JacksonXmlRootElement(localName = "Blobs") +/** + * The BlobFlatListSegment model. + */ @Fluent -public final class BlobFlatListSegment { +public final class BlobFlatListSegment implements XmlSerializable { + /* * The BlobItems property. */ - @JsonProperty("Blob") private List blobItems = new ArrayList<>(); - /** Creates an instance of BlobFlatListSegment class. */ - public BlobFlatListSegment() {} + /** + * Creates an instance of BlobFlatListSegment class. + */ + public BlobFlatListSegment() { + } /** * Get the blobItems property: The BlobItems property. @@ -42,4 +50,64 @@ public BlobFlatListSegment setBlobItems(List blobItems) { this.blobItems = blobItems; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.blobItems != null) { + for (BlobItemInternal element : this.blobItems) { + xmlWriter.writeXml(element, "Blob"); + } + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobFlatListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobFlatListSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobFlatListSegment. + */ + public static BlobFlatListSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobFlatListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobFlatListSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobFlatListSegment. + */ + public static BlobFlatListSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobFlatListSegment deserializedBlobFlatListSegment = new BlobFlatListSegment(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + if ("Blob".equals(elementName.getLocalPart())) { + if (deserializedBlobFlatListSegment.blobItems == null) { + deserializedBlobFlatListSegment.blobItems = new ArrayList<>(); + } + deserializedBlobFlatListSegment.blobItems.add(BlobItemInternal.fromXml(reader, "Blob")); + } else { + reader.skipElement(); + } + } + return deserializedBlobFlatListSegment; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java index 7cc24ebae7225..71514efeff355 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java @@ -1,35 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. - package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The BlobHierarchyListSegment model. */ -@JacksonXmlRootElement(localName = "Blobs") +/** + * The BlobHierarchyListSegment model. + */ @Fluent -@JsonDeserialize(using = com.azure.storage.blob.implementation.util.CustomHierarchicalListingDeserializer.class) -public final class BlobHierarchyListSegment { +public final class BlobHierarchyListSegment implements XmlSerializable { + /* * The BlobPrefixes property. */ - @JsonProperty("BlobPrefixInternal") private List blobPrefixes = new ArrayList<>(); /* * The BlobItems property. */ - @JsonProperty("Blob") private List blobItems = new ArrayList<>(); - /** Creates an instance of BlobHierarchyListSegment class. */ - public BlobHierarchyListSegment() {} + /** + * Creates an instance of BlobHierarchyListSegment class. + */ + public BlobHierarchyListSegment() { + } /** * Get the blobPrefixes property: The BlobPrefixes property. @@ -70,4 +75,76 @@ public BlobHierarchyListSegment setBlobItems(List blobItems) { this.blobItems = blobItems; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.blobPrefixes != null) { + for (BlobPrefixInternal element : this.blobPrefixes) { + xmlWriter.writeXml(element, "BlobPrefixInternal"); + } + } + if (this.blobItems != null) { + for (BlobItemInternal element : this.blobItems) { + xmlWriter.writeXml(element, "Blob"); + } + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobHierarchyListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobHierarchyListSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobHierarchyListSegment. + */ + public static BlobHierarchyListSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobHierarchyListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobHierarchyListSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobHierarchyListSegment. + */ + public static BlobHierarchyListSegment fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blobs" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobHierarchyListSegment deserializedBlobHierarchyListSegment = new BlobHierarchyListSegment(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + if ("BlobPrefixInternal".equals(elementName.getLocalPart())) { + if (deserializedBlobHierarchyListSegment.blobPrefixes == null) { + deserializedBlobHierarchyListSegment.blobPrefixes = new ArrayList<>(); + } + deserializedBlobHierarchyListSegment.blobPrefixes + .add(BlobPrefixInternal.fromXml(reader, "BlobPrefixInternal")); + } else if ("Blob".equals(elementName.getLocalPart())) { + if (deserializedBlobHierarchyListSegment.blobItems == null) { + deserializedBlobHierarchyListSegment.blobItems = new ArrayList<>(); + } + deserializedBlobHierarchyListSegment.blobItems.add(BlobItemInternal.fromXml(reader, "Blob")); + } else { + reader.skipElement(); + } + } + return deserializedBlobHierarchyListSegment; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java index b0104c913ef01..63798c6e9d03f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java @@ -5,86 +5,85 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import java.util.LinkedHashMap; import java.util.Map; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** An Azure Storage blob. */ -@JacksonXmlRootElement(localName = "Blob") +/** + * An Azure Storage blob. + */ @Fluent -public final class BlobItemInternal { +public final class BlobItemInternal implements XmlSerializable { /* * The Name property. */ - @JsonProperty(value = "Name", required = true) private BlobName name; /* * The Deleted property. */ - @JsonProperty(value = "Deleted", required = true) private boolean deleted; /* * The Snapshot property. */ - @JsonProperty(value = "Snapshot", required = true) private String snapshot; /* * The VersionId property. */ - @JsonProperty(value = "VersionId", required = true) private String versionId; /* * The IsCurrentVersion property. */ - @JsonProperty(value = "IsCurrentVersion") private Boolean isCurrentVersion; /* * Properties of a blob */ - @JsonProperty(value = "Properties", required = true) private BlobItemPropertiesInternal properties; /* * Dictionary of */ - @JsonProperty(value = "Metadata") private Map metadata; /* * Blob tags */ - @JsonProperty(value = "Tags") private BlobTags blobTags; /* * Dictionary of */ - @JsonProperty(value = "OrMetadata") private Map objectReplicationMetadata; /* * The HasVersionsOnly property. */ - @JsonProperty(value = "HasVersionsOnly") private Boolean hasVersionsOnly; /* * The IsPrefix property. */ - @JsonProperty(value = "IsPrefix") private Boolean isPrefix; - /** Creates an instance of BlobItemInternal class. */ - public BlobItemInternal() {} + /** + * Creates an instance of BlobItemInternal class. + */ + public BlobItemInternal() { + } /** * Get the name property: The Name property. - * + * * @return the name value. */ public BlobName getName() { @@ -93,7 +92,7 @@ public BlobName getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobItemInternal object itself. */ @@ -104,7 +103,7 @@ public BlobItemInternal setName(BlobName name) { /** * Get the deleted property: The Deleted property. - * + * * @return the deleted value. */ public boolean isDeleted() { @@ -113,7 +112,7 @@ public boolean isDeleted() { /** * Set the deleted property: The Deleted property. - * + * * @param deleted the deleted value to set. * @return the BlobItemInternal object itself. */ @@ -124,7 +123,7 @@ public BlobItemInternal setDeleted(boolean deleted) { /** * Get the snapshot property: The Snapshot property. - * + * * @return the snapshot value. */ public String getSnapshot() { @@ -133,7 +132,7 @@ public String getSnapshot() { /** * Set the snapshot property: The Snapshot property. - * + * * @param snapshot the snapshot value to set. * @return the BlobItemInternal object itself. */ @@ -144,7 +143,7 @@ public BlobItemInternal setSnapshot(String snapshot) { /** * Get the versionId property: The VersionId property. - * + * * @return the versionId value. */ public String getVersionId() { @@ -153,7 +152,7 @@ public String getVersionId() { /** * Set the versionId property: The VersionId property. - * + * * @param versionId the versionId value to set. * @return the BlobItemInternal object itself. */ @@ -164,7 +163,7 @@ public BlobItemInternal setVersionId(String versionId) { /** * Get the isCurrentVersion property: The IsCurrentVersion property. - * + * * @return the isCurrentVersion value. */ public Boolean isCurrentVersion() { @@ -173,7 +172,7 @@ public Boolean isCurrentVersion() { /** * Set the isCurrentVersion property: The IsCurrentVersion property. - * + * * @param isCurrentVersion the isCurrentVersion value to set. * @return the BlobItemInternal object itself. */ @@ -184,7 +183,7 @@ public BlobItemInternal setIsCurrentVersion(Boolean isCurrentVersion) { /** * Get the properties property: Properties of a blob. - * + * * @return the properties value. */ public BlobItemPropertiesInternal getProperties() { @@ -193,7 +192,7 @@ public BlobItemPropertiesInternal getProperties() { /** * Set the properties property: Properties of a blob. - * + * * @param properties the properties value to set. * @return the BlobItemInternal object itself. */ @@ -204,7 +203,7 @@ public BlobItemInternal setProperties(BlobItemPropertiesInternal properties) { /** * Get the metadata property: Dictionary of <string>. - * + * * @return the metadata value. */ public Map getMetadata() { @@ -213,7 +212,7 @@ public Map getMetadata() { /** * Set the metadata property: Dictionary of <string>. - * + * * @param metadata the metadata value to set. * @return the BlobItemInternal object itself. */ @@ -224,7 +223,7 @@ public BlobItemInternal setMetadata(Map metadata) { /** * Get the blobTags property: Blob tags. - * + * * @return the blobTags value. */ public BlobTags getBlobTags() { @@ -233,7 +232,7 @@ public BlobTags getBlobTags() { /** * Set the blobTags property: Blob tags. - * + * * @param blobTags the blobTags value to set. * @return the BlobItemInternal object itself. */ @@ -244,7 +243,7 @@ public BlobItemInternal setBlobTags(BlobTags blobTags) { /** * Get the objectReplicationMetadata property: Dictionary of <string>. - * + * * @return the objectReplicationMetadata value. */ public Map getObjectReplicationMetadata() { @@ -253,7 +252,7 @@ public Map getObjectReplicationMetadata() { /** * Set the objectReplicationMetadata property: Dictionary of <string>. - * + * * @param objectReplicationMetadata the objectReplicationMetadata value to set. * @return the BlobItemInternal object itself. */ @@ -264,7 +263,7 @@ public BlobItemInternal setObjectReplicationMetadata(Map objectR /** * Get the hasVersionsOnly property: The HasVersionsOnly property. - * + * * @return the hasVersionsOnly value. */ public Boolean isHasVersionsOnly() { @@ -273,7 +272,7 @@ public Boolean isHasVersionsOnly() { /** * Set the hasVersionsOnly property: The HasVersionsOnly property. - * + * * @param hasVersionsOnly the hasVersionsOnly value to set. * @return the BlobItemInternal object itself. */ @@ -284,7 +283,7 @@ public BlobItemInternal setHasVersionsOnly(Boolean hasVersionsOnly) { /** * Get the isPrefix property: The IsPrefix property. - * + * * @return the isPrefix value. */ public Boolean isPrefix() { @@ -293,7 +292,7 @@ public Boolean isPrefix() { /** * Set the isPrefix property: The IsPrefix property. - * + * * @param isPrefix the isPrefix value to set. * @return the BlobItemInternal object itself. */ @@ -301,4 +300,113 @@ public BlobItemInternal setIsPrefix(Boolean isPrefix) { this.isPrefix = isPrefix; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.name, "Name"); + xmlWriter.writeBooleanElement("Deleted", this.deleted); + xmlWriter.writeStringElement("Snapshot", this.snapshot); + xmlWriter.writeStringElement("VersionId", this.versionId); + xmlWriter.writeBooleanElement("IsCurrentVersion", this.isCurrentVersion); + xmlWriter.writeXml(this.properties, "Properties"); + if (this.metadata != null) { + xmlWriter.writeStartElement("Metadata"); + for (Map.Entry entry : this.metadata.entrySet()) { + xmlWriter.writeStringElement(entry.getKey(), entry.getValue()); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeXml(this.blobTags, "Tags"); + if (this.objectReplicationMetadata != null) { + xmlWriter.writeStartElement("OrMetadata"); + for (Map.Entry entry : this.objectReplicationMetadata.entrySet()) { + xmlWriter.writeStringElement(entry.getKey(), entry.getValue()); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeBooleanElement("HasVersionsOnly", this.hasVersionsOnly); + xmlWriter.writeBooleanElement("IsPrefix", this.isPrefix); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobItemInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobItemInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobItemInternal. + */ + public static BlobItemInternal fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobItemInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobItemInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobItemInternal. + */ + public static BlobItemInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobItemInternal deserializedBlobItemInternal = new BlobItemInternal(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.name = BlobName.fromXml(reader, "Name"); + } else if ("Deleted".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.deleted = reader.getBooleanElement(); + } else if ("Snapshot".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.snapshot = reader.getStringElement(); + } else if ("VersionId".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.versionId = reader.getStringElement(); + } else if ("IsCurrentVersion".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); + } else if ("Properties".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.properties = BlobItemPropertiesInternal.fromXml(reader, "Properties"); + } else if ("Metadata".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + if (deserializedBlobItemInternal.metadata == null) { + deserializedBlobItemInternal.metadata = new LinkedHashMap<>(); + } + deserializedBlobItemInternal.metadata.put(reader.getElementName().getLocalPart(), + reader.getStringElement()); + } + } else if ("Tags".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.blobTags = BlobTags.fromXml(reader, "Tags"); + } else if ("OrMetadata".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + if (deserializedBlobItemInternal.objectReplicationMetadata == null) { + deserializedBlobItemInternal.objectReplicationMetadata = new LinkedHashMap<>(); + } + deserializedBlobItemInternal.objectReplicationMetadata + .put(reader.getElementName().getLocalPart(), reader.getStringElement()); + } + } else if ("HasVersionsOnly".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.hasVersionsOnly = reader.getNullableElement(Boolean::parseBoolean); + } else if ("IsPrefix".equals(elementName.getLocalPart())) { + deserializedBlobItemInternal.isPrefix = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedBlobItemInternal; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java index c0e8f63c715ae..c03ed2bd9129c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java @@ -16,261 +16,229 @@ import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; import com.azure.storage.blob.models.RehydratePriority; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.time.OffsetDateTime; +import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Properties of a blob. */ -@JacksonXmlRootElement(localName = "Properties") +/** + * Properties of a blob. + */ @Fluent -public final class BlobItemPropertiesInternal { +public final class BlobItemPropertiesInternal implements XmlSerializable { /* * The Creation-Time property. */ - @JsonProperty(value = "Creation-Time") private DateTimeRfc1123 creationTime; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified", required = true) private DateTimeRfc1123 lastModified; /* * The Etag property. */ - @JsonProperty(value = "Etag", required = true) private String eTag; /* * Size in bytes */ - @JsonProperty(value = "Content-Length") private Long contentLength; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; /* * The Content-Encoding property. */ - @JsonProperty(value = "Content-Encoding") private String contentEncoding; /* * The Content-Language property. */ - @JsonProperty(value = "Content-Language") private String contentLanguage; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMd5; /* * The Content-Disposition property. */ - @JsonProperty(value = "Content-Disposition") private String contentDisposition; /* * The Cache-Control property. */ - @JsonProperty(value = "Cache-Control") private String cacheControl; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long blobSequenceNumber; /* * The BlobType property. */ - @JsonProperty(value = "BlobType") private BlobType blobType; /* * The LeaseStatus property. */ - @JsonProperty(value = "LeaseStatus") private LeaseStatusType leaseStatus; /* * The LeaseState property. */ - @JsonProperty(value = "LeaseState") private LeaseStateType leaseState; /* * The LeaseDuration property. */ - @JsonProperty(value = "LeaseDuration") private LeaseDurationType leaseDuration; /* * The CopyId property. */ - @JsonProperty(value = "CopyId") private String copyId; /* * The CopyStatus property. */ - @JsonProperty(value = "CopyStatus") private CopyStatusType copyStatus; /* * The CopySource property. */ - @JsonProperty(value = "CopySource") private String copySource; /* * The CopyProgress property. */ - @JsonProperty(value = "CopyProgress") private String copyProgress; /* * The CopyCompletionTime property. */ - @JsonProperty(value = "CopyCompletionTime") private DateTimeRfc1123 copyCompletionTime; /* * The CopyStatusDescription property. */ - @JsonProperty(value = "CopyStatusDescription") private String copyStatusDescription; /* * The ServerEncrypted property. */ - @JsonProperty(value = "ServerEncrypted") private Boolean serverEncrypted; /* * The IncrementalCopy property. */ - @JsonProperty(value = "IncrementalCopy") private Boolean incrementalCopy; /* * The DestinationSnapshot property. */ - @JsonProperty(value = "DestinationSnapshot") private String destinationSnapshot; /* * The DeletedTime property. */ - @JsonProperty(value = "DeletedTime") private DateTimeRfc1123 deletedTime; /* * The RemainingRetentionDays property. */ - @JsonProperty(value = "RemainingRetentionDays") private Integer remainingRetentionDays; /* * The AccessTier property. */ - @JsonProperty(value = "AccessTier") private AccessTier accessTier; /* * The AccessTierInferred property. */ - @JsonProperty(value = "AccessTierInferred") private Boolean accessTierInferred; /* * The ArchiveStatus property. */ - @JsonProperty(value = "ArchiveStatus") private ArchiveStatus archiveStatus; /* * The CustomerProvidedKeySha256 property. */ - @JsonProperty(value = "CustomerProvidedKeySha256") private String customerProvidedKeySha256; /* * The name of the encryption scope under which the blob is encrypted. */ - @JsonProperty(value = "EncryptionScope") private String encryptionScope; /* * The AccessTierChangeTime property. */ - @JsonProperty(value = "AccessTierChangeTime") private DateTimeRfc1123 accessTierChangeTime; /* * The TagCount property. */ - @JsonProperty(value = "TagCount") private Integer tagCount; /* * The Expiry-Time property. */ - @JsonProperty(value = "Expiry-Time") private DateTimeRfc1123 expiresOn; /* * The Sealed property. */ - @JsonProperty(value = "Sealed") private Boolean isSealed; /* - * If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values - * are High and Standard. + * If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard. */ - @JsonProperty(value = "RehydratePriority") private RehydratePriority rehydratePriority; /* * The LastAccessTime property. */ - @JsonProperty(value = "LastAccessTime") private DateTimeRfc1123 lastAccessedOn; /* * The ImmutabilityPolicyUntilDate property. */ - @JsonProperty(value = "ImmutabilityPolicyUntilDate") private DateTimeRfc1123 immutabilityPolicyExpiresOn; /* * The ImmutabilityPolicyMode property. */ - @JsonProperty(value = "ImmutabilityPolicyMode") private BlobImmutabilityPolicyMode immutabilityPolicyMode; /* * The LegalHold property. */ - @JsonProperty(value = "LegalHold") private Boolean legalHold; - /** Creates an instance of BlobItemPropertiesInternal class. */ - public BlobItemPropertiesInternal() {} + /** + * Creates an instance of BlobItemPropertiesInternal class. + */ + public BlobItemPropertiesInternal() { + } /** * Get the creationTime property: The Creation-Time property. - * + * * @return the creationTime value. */ public OffsetDateTime getCreationTime() { @@ -282,7 +250,7 @@ public OffsetDateTime getCreationTime() { /** * Set the creationTime property: The Creation-Time property. - * + * * @param creationTime the creationTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -297,7 +265,7 @@ public BlobItemPropertiesInternal setCreationTime(OffsetDateTime creationTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -309,7 +277,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -324,7 +292,7 @@ public BlobItemPropertiesInternal setLastModified(OffsetDateTime lastModified) { /** * Get the eTag property: The Etag property. - * + * * @return the eTag value. */ public String getETag() { @@ -333,7 +301,7 @@ public String getETag() { /** * Set the eTag property: The Etag property. - * + * * @param eTag the eTag value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -344,7 +312,7 @@ public BlobItemPropertiesInternal setETag(String eTag) { /** * Get the contentLength property: Size in bytes. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -353,7 +321,7 @@ public Long getContentLength() { /** * Set the contentLength property: Size in bytes. - * + * * @param contentLength the contentLength value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -364,7 +332,7 @@ public BlobItemPropertiesInternal setContentLength(Long contentLength) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -373,7 +341,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -384,7 +352,7 @@ public BlobItemPropertiesInternal setContentType(String contentType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -393,7 +361,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -404,7 +372,7 @@ public BlobItemPropertiesInternal setContentEncoding(String contentEncoding) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -413,7 +381,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -424,7 +392,7 @@ public BlobItemPropertiesInternal setContentLanguage(String contentLanguage) { /** * Get the contentMd5 property: The Content-MD5 property. - * + * * @return the contentMd5 value. */ public byte[] getContentMd5() { @@ -433,7 +401,7 @@ public byte[] getContentMd5() { /** * Set the contentMd5 property: The Content-MD5 property. - * + * * @param contentMd5 the contentMd5 value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -444,7 +412,7 @@ public BlobItemPropertiesInternal setContentMd5(byte[] contentMd5) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -453,7 +421,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -464,7 +432,7 @@ public BlobItemPropertiesInternal setContentDisposition(String contentDispositio /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -473,7 +441,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -484,7 +452,7 @@ public BlobItemPropertiesInternal setCacheControl(String cacheControl) { /** * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the blobSequenceNumber value. */ public Long getBlobSequenceNumber() { @@ -493,7 +461,7 @@ public Long getBlobSequenceNumber() { /** * Set the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param blobSequenceNumber the blobSequenceNumber value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -504,7 +472,7 @@ public BlobItemPropertiesInternal setBlobSequenceNumber(Long blobSequenceNumber) /** * Get the blobType property: The BlobType property. - * + * * @return the blobType value. */ public BlobType getBlobType() { @@ -513,7 +481,7 @@ public BlobType getBlobType() { /** * Set the blobType property: The BlobType property. - * + * * @param blobType the blobType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -524,7 +492,7 @@ public BlobItemPropertiesInternal setBlobType(BlobType blobType) { /** * Get the leaseStatus property: The LeaseStatus property. - * + * * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { @@ -533,7 +501,7 @@ public LeaseStatusType getLeaseStatus() { /** * Set the leaseStatus property: The LeaseStatus property. - * + * * @param leaseStatus the leaseStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -544,7 +512,7 @@ public BlobItemPropertiesInternal setLeaseStatus(LeaseStatusType leaseStatus) { /** * Get the leaseState property: The LeaseState property. - * + * * @return the leaseState value. */ public LeaseStateType getLeaseState() { @@ -553,7 +521,7 @@ public LeaseStateType getLeaseState() { /** * Set the leaseState property: The LeaseState property. - * + * * @param leaseState the leaseState value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -564,7 +532,7 @@ public BlobItemPropertiesInternal setLeaseState(LeaseStateType leaseState) { /** * Get the leaseDuration property: The LeaseDuration property. - * + * * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { @@ -573,7 +541,7 @@ public LeaseDurationType getLeaseDuration() { /** * Set the leaseDuration property: The LeaseDuration property. - * + * * @param leaseDuration the leaseDuration value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -584,7 +552,7 @@ public BlobItemPropertiesInternal setLeaseDuration(LeaseDurationType leaseDurati /** * Get the copyId property: The CopyId property. - * + * * @return the copyId value. */ public String getCopyId() { @@ -593,7 +561,7 @@ public String getCopyId() { /** * Set the copyId property: The CopyId property. - * + * * @param copyId the copyId value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -604,7 +572,7 @@ public BlobItemPropertiesInternal setCopyId(String copyId) { /** * Get the copyStatus property: The CopyStatus property. - * + * * @return the copyStatus value. */ public CopyStatusType getCopyStatus() { @@ -613,7 +581,7 @@ public CopyStatusType getCopyStatus() { /** * Set the copyStatus property: The CopyStatus property. - * + * * @param copyStatus the copyStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -624,7 +592,7 @@ public BlobItemPropertiesInternal setCopyStatus(CopyStatusType copyStatus) { /** * Get the copySource property: The CopySource property. - * + * * @return the copySource value. */ public String getCopySource() { @@ -633,7 +601,7 @@ public String getCopySource() { /** * Set the copySource property: The CopySource property. - * + * * @param copySource the copySource value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -644,7 +612,7 @@ public BlobItemPropertiesInternal setCopySource(String copySource) { /** * Get the copyProgress property: The CopyProgress property. - * + * * @return the copyProgress value. */ public String getCopyProgress() { @@ -653,7 +621,7 @@ public String getCopyProgress() { /** * Set the copyProgress property: The CopyProgress property. - * + * * @param copyProgress the copyProgress value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -664,7 +632,7 @@ public BlobItemPropertiesInternal setCopyProgress(String copyProgress) { /** * Get the copyCompletionTime property: The CopyCompletionTime property. - * + * * @return the copyCompletionTime value. */ public OffsetDateTime getCopyCompletionTime() { @@ -676,7 +644,7 @@ public OffsetDateTime getCopyCompletionTime() { /** * Set the copyCompletionTime property: The CopyCompletionTime property. - * + * * @param copyCompletionTime the copyCompletionTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -691,7 +659,7 @@ public BlobItemPropertiesInternal setCopyCompletionTime(OffsetDateTime copyCompl /** * Get the copyStatusDescription property: The CopyStatusDescription property. - * + * * @return the copyStatusDescription value. */ public String getCopyStatusDescription() { @@ -700,7 +668,7 @@ public String getCopyStatusDescription() { /** * Set the copyStatusDescription property: The CopyStatusDescription property. - * + * * @param copyStatusDescription the copyStatusDescription value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -711,7 +679,7 @@ public BlobItemPropertiesInternal setCopyStatusDescription(String copyStatusDesc /** * Get the serverEncrypted property: The ServerEncrypted property. - * + * * @return the serverEncrypted value. */ public Boolean isServerEncrypted() { @@ -720,7 +688,7 @@ public Boolean isServerEncrypted() { /** * Set the serverEncrypted property: The ServerEncrypted property. - * + * * @param serverEncrypted the serverEncrypted value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -731,7 +699,7 @@ public BlobItemPropertiesInternal setServerEncrypted(Boolean serverEncrypted) { /** * Get the incrementalCopy property: The IncrementalCopy property. - * + * * @return the incrementalCopy value. */ public Boolean isIncrementalCopy() { @@ -740,7 +708,7 @@ public Boolean isIncrementalCopy() { /** * Set the incrementalCopy property: The IncrementalCopy property. - * + * * @param incrementalCopy the incrementalCopy value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -751,7 +719,7 @@ public BlobItemPropertiesInternal setIncrementalCopy(Boolean incrementalCopy) { /** * Get the destinationSnapshot property: The DestinationSnapshot property. - * + * * @return the destinationSnapshot value. */ public String getDestinationSnapshot() { @@ -760,7 +728,7 @@ public String getDestinationSnapshot() { /** * Set the destinationSnapshot property: The DestinationSnapshot property. - * + * * @param destinationSnapshot the destinationSnapshot value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -771,7 +739,7 @@ public BlobItemPropertiesInternal setDestinationSnapshot(String destinationSnaps /** * Get the deletedTime property: The DeletedTime property. - * + * * @return the deletedTime value. */ public OffsetDateTime getDeletedTime() { @@ -783,7 +751,7 @@ public OffsetDateTime getDeletedTime() { /** * Set the deletedTime property: The DeletedTime property. - * + * * @param deletedTime the deletedTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -798,7 +766,7 @@ public BlobItemPropertiesInternal setDeletedTime(OffsetDateTime deletedTime) { /** * Get the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @return the remainingRetentionDays value. */ public Integer getRemainingRetentionDays() { @@ -807,7 +775,7 @@ public Integer getRemainingRetentionDays() { /** * Set the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -818,7 +786,7 @@ public BlobItemPropertiesInternal setRemainingRetentionDays(Integer remainingRet /** * Get the accessTier property: The AccessTier property. - * + * * @return the accessTier value. */ public AccessTier getAccessTier() { @@ -827,7 +795,7 @@ public AccessTier getAccessTier() { /** * Set the accessTier property: The AccessTier property. - * + * * @param accessTier the accessTier value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -838,7 +806,7 @@ public BlobItemPropertiesInternal setAccessTier(AccessTier accessTier) { /** * Get the accessTierInferred property: The AccessTierInferred property. - * + * * @return the accessTierInferred value. */ public Boolean isAccessTierInferred() { @@ -847,7 +815,7 @@ public Boolean isAccessTierInferred() { /** * Set the accessTierInferred property: The AccessTierInferred property. - * + * * @param accessTierInferred the accessTierInferred value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -858,7 +826,7 @@ public BlobItemPropertiesInternal setAccessTierInferred(Boolean accessTierInferr /** * Get the archiveStatus property: The ArchiveStatus property. - * + * * @return the archiveStatus value. */ public ArchiveStatus getArchiveStatus() { @@ -867,7 +835,7 @@ public ArchiveStatus getArchiveStatus() { /** * Set the archiveStatus property: The ArchiveStatus property. - * + * * @param archiveStatus the archiveStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -878,7 +846,7 @@ public BlobItemPropertiesInternal setArchiveStatus(ArchiveStatus archiveStatus) /** * Get the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * * @return the customerProvidedKeySha256 value. */ public String getCustomerProvidedKeySha256() { @@ -887,7 +855,7 @@ public String getCustomerProvidedKeySha256() { /** * Set the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * * @param customerProvidedKeySha256 the customerProvidedKeySha256 value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -898,7 +866,7 @@ public BlobItemPropertiesInternal setCustomerProvidedKeySha256(String customerPr /** * Get the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * * @return the encryptionScope value. */ public String getEncryptionScope() { @@ -907,7 +875,7 @@ public String getEncryptionScope() { /** * Set the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * * @param encryptionScope the encryptionScope value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -918,7 +886,7 @@ public BlobItemPropertiesInternal setEncryptionScope(String encryptionScope) { /** * Get the accessTierChangeTime property: The AccessTierChangeTime property. - * + * * @return the accessTierChangeTime value. */ public OffsetDateTime getAccessTierChangeTime() { @@ -930,7 +898,7 @@ public OffsetDateTime getAccessTierChangeTime() { /** * Set the accessTierChangeTime property: The AccessTierChangeTime property. - * + * * @param accessTierChangeTime the accessTierChangeTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -945,7 +913,7 @@ public BlobItemPropertiesInternal setAccessTierChangeTime(OffsetDateTime accessT /** * Get the tagCount property: The TagCount property. - * + * * @return the tagCount value. */ public Integer getTagCount() { @@ -954,7 +922,7 @@ public Integer getTagCount() { /** * Set the tagCount property: The TagCount property. - * + * * @param tagCount the tagCount value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -965,7 +933,7 @@ public BlobItemPropertiesInternal setTagCount(Integer tagCount) { /** * Get the expiresOn property: The Expiry-Time property. - * + * * @return the expiresOn value. */ public OffsetDateTime getExpiresOn() { @@ -977,7 +945,7 @@ public OffsetDateTime getExpiresOn() { /** * Set the expiresOn property: The Expiry-Time property. - * + * * @param expiresOn the expiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -992,7 +960,7 @@ public BlobItemPropertiesInternal setExpiresOn(OffsetDateTime expiresOn) { /** * Get the isSealed property: The Sealed property. - * + * * @return the isSealed value. */ public Boolean isSealed() { @@ -1001,7 +969,7 @@ public Boolean isSealed() { /** * Set the isSealed property: The Sealed property. - * + * * @param isSealed the isSealed value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1013,7 +981,7 @@ public BlobItemPropertiesInternal setIsSealed(Boolean isSealed) { /** * Get the rehydratePriority property: If an object is in rehydrate pending state then this header is returned with * priority of rehydrate. Valid values are High and Standard. - * + * * @return the rehydratePriority value. */ public RehydratePriority getRehydratePriority() { @@ -1023,7 +991,7 @@ public RehydratePriority getRehydratePriority() { /** * Set the rehydratePriority property: If an object is in rehydrate pending state then this header is returned with * priority of rehydrate. Valid values are High and Standard. - * + * * @param rehydratePriority the rehydratePriority value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1034,7 +1002,7 @@ public BlobItemPropertiesInternal setRehydratePriority(RehydratePriority rehydra /** * Get the lastAccessedOn property: The LastAccessTime property. - * + * * @return the lastAccessedOn value. */ public OffsetDateTime getLastAccessedOn() { @@ -1046,7 +1014,7 @@ public OffsetDateTime getLastAccessedOn() { /** * Set the lastAccessedOn property: The LastAccessTime property. - * + * * @param lastAccessedOn the lastAccessedOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1061,7 +1029,7 @@ public BlobItemPropertiesInternal setLastAccessedOn(OffsetDateTime lastAccessedO /** * Get the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * * @return the immutabilityPolicyExpiresOn value. */ public OffsetDateTime getImmutabilityPolicyExpiresOn() { @@ -1073,7 +1041,7 @@ public OffsetDateTime getImmutabilityPolicyExpiresOn() { /** * Set the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * * @param immutabilityPolicyExpiresOn the immutabilityPolicyExpiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1088,7 +1056,7 @@ public BlobItemPropertiesInternal setImmutabilityPolicyExpiresOn(OffsetDateTime /** * Get the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * * @return the immutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { @@ -1097,7 +1065,7 @@ public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { /** * Set the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * * @param immutabilityPolicyMode the immutabilityPolicyMode value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1108,7 +1076,7 @@ public BlobItemPropertiesInternal setImmutabilityPolicyMode(BlobImmutabilityPoli /** * Get the legalHold property: The LegalHold property. - * + * * @return the legalHold value. */ public Boolean isLegalHold() { @@ -1117,7 +1085,7 @@ public Boolean isLegalHold() { /** * Set the legalHold property: The LegalHold property. - * + * * @param legalHold the legalHold value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1125,4 +1093,202 @@ public BlobItemPropertiesInternal setLegalHold(Boolean legalHold) { this.legalHold = legalHold; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Properties" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Creation-Time", Objects.toString(this.creationTime, null)); + xmlWriter.writeStringElement("Last-Modified", Objects.toString(this.lastModified, null)); + xmlWriter.writeStringElement("Etag", this.eTag); + xmlWriter.writeNumberElement("Content-Length", this.contentLength); + xmlWriter.writeStringElement("Content-Type", this.contentType); + xmlWriter.writeStringElement("Content-Encoding", this.contentEncoding); + xmlWriter.writeStringElement("Content-Language", this.contentLanguage); + xmlWriter.writeBinaryElement("Content-MD5", this.contentMd5); + xmlWriter.writeStringElement("Content-Disposition", this.contentDisposition); + xmlWriter.writeStringElement("Cache-Control", this.cacheControl); + xmlWriter.writeNumberElement("x-ms-blob-sequence-number", this.blobSequenceNumber); + xmlWriter.writeStringElement("BlobType", this.blobType == null ? null : this.blobType.toString()); + xmlWriter.writeStringElement("LeaseStatus", this.leaseStatus == null ? null : this.leaseStatus.toString()); + xmlWriter.writeStringElement("LeaseState", this.leaseState == null ? null : this.leaseState.toString()); + xmlWriter.writeStringElement("LeaseDuration", + this.leaseDuration == null ? null : this.leaseDuration.toString()); + xmlWriter.writeStringElement("CopyId", this.copyId); + xmlWriter.writeStringElement("CopyStatus", this.copyStatus == null ? null : this.copyStatus.toString()); + xmlWriter.writeStringElement("CopySource", this.copySource); + xmlWriter.writeStringElement("CopyProgress", this.copyProgress); + xmlWriter.writeStringElement("CopyCompletionTime", Objects.toString(this.copyCompletionTime, null)); + xmlWriter.writeStringElement("CopyStatusDescription", this.copyStatusDescription); + xmlWriter.writeBooleanElement("ServerEncrypted", this.serverEncrypted); + xmlWriter.writeBooleanElement("IncrementalCopy", this.incrementalCopy); + xmlWriter.writeStringElement("DestinationSnapshot", this.destinationSnapshot); + xmlWriter.writeStringElement("DeletedTime", Objects.toString(this.deletedTime, null)); + xmlWriter.writeNumberElement("RemainingRetentionDays", this.remainingRetentionDays); + xmlWriter.writeStringElement("AccessTier", this.accessTier == null ? null : this.accessTier.toString()); + xmlWriter.writeBooleanElement("AccessTierInferred", this.accessTierInferred); + xmlWriter.writeStringElement("ArchiveStatus", + this.archiveStatus == null ? null : this.archiveStatus.toString()); + xmlWriter.writeStringElement("CustomerProvidedKeySha256", this.customerProvidedKeySha256); + xmlWriter.writeStringElement("EncryptionScope", this.encryptionScope); + xmlWriter.writeStringElement("AccessTierChangeTime", Objects.toString(this.accessTierChangeTime, null)); + xmlWriter.writeNumberElement("TagCount", this.tagCount); + xmlWriter.writeStringElement("Expiry-Time", Objects.toString(this.expiresOn, null)); + xmlWriter.writeBooleanElement("Sealed", this.isSealed); + xmlWriter.writeStringElement("RehydratePriority", + this.rehydratePriority == null ? null : this.rehydratePriority.toString()); + xmlWriter.writeStringElement("LastAccessTime", Objects.toString(this.lastAccessedOn, null)); + xmlWriter.writeStringElement("ImmutabilityPolicyUntilDate", + Objects.toString(this.immutabilityPolicyExpiresOn, null)); + xmlWriter.writeStringElement("ImmutabilityPolicyMode", + this.immutabilityPolicyMode == null ? null : this.immutabilityPolicyMode.toString()); + xmlWriter.writeBooleanElement("LegalHold", this.legalHold); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobItemPropertiesInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobItemPropertiesInternal if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobItemPropertiesInternal. + */ + public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobItemPropertiesInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobItemPropertiesInternal if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobItemPropertiesInternal. + */ + public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Properties" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobItemPropertiesInternal deserializedBlobItemPropertiesInternal = new BlobItemPropertiesInternal(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Creation-Time".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.creationTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Last-Modified".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.lastModified + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Etag".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.eTag = reader.getStringElement(); + } else if ("Content-Length".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentLength = reader.getNullableElement(Long::parseLong); + } else if ("Content-Type".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentType = reader.getStringElement(); + } else if ("Content-Encoding".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentEncoding = reader.getStringElement(); + } else if ("Content-Language".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentLanguage = reader.getStringElement(); + } else if ("Content-MD5".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentMd5 = reader.getBinaryElement(); + } else if ("Content-Disposition".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.contentDisposition = reader.getStringElement(); + } else if ("Cache-Control".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.cacheControl = reader.getStringElement(); + } else if ("x-ms-blob-sequence-number".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.blobSequenceNumber + = reader.getNullableElement(Long::parseLong); + } else if ("BlobType".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.blobType = BlobType.fromString(reader.getStringElement()); + } else if ("LeaseStatus".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.leaseStatus + = LeaseStatusType.fromString(reader.getStringElement()); + } else if ("LeaseState".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.leaseState + = LeaseStateType.fromString(reader.getStringElement()); + } else if ("LeaseDuration".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.leaseDuration + = LeaseDurationType.fromString(reader.getStringElement()); + } else if ("CopyId".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyId = reader.getStringElement(); + } else if ("CopyStatus".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyStatus + = CopyStatusType.fromString(reader.getStringElement()); + } else if ("CopySource".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copySource = reader.getStringElement(); + } else if ("CopyProgress".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyProgress = reader.getStringElement(); + } else if ("CopyCompletionTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyCompletionTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("CopyStatusDescription".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.copyStatusDescription = reader.getStringElement(); + } else if ("ServerEncrypted".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.serverEncrypted + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("IncrementalCopy".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.incrementalCopy + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("DestinationSnapshot".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.destinationSnapshot = reader.getStringElement(); + } else if ("DeletedTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.deletedTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("RemainingRetentionDays".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.remainingRetentionDays + = reader.getNullableElement(Integer::parseInt); + } else if ("AccessTier".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.accessTier + = AccessTier.fromString(reader.getStringElement()); + } else if ("AccessTierInferred".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.accessTierInferred + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("ArchiveStatus".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.archiveStatus + = ArchiveStatus.fromString(reader.getStringElement()); + } else if ("CustomerProvidedKeySha256".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.customerProvidedKeySha256 = reader.getStringElement(); + } else if ("EncryptionScope".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.encryptionScope = reader.getStringElement(); + } else if ("AccessTierChangeTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.accessTierChangeTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("TagCount".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.tagCount = reader.getNullableElement(Integer::parseInt); + } else if ("Expiry-Time".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.expiresOn = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Sealed".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.isSealed = reader.getNullableElement(Boolean::parseBoolean); + } else if ("RehydratePriority".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.rehydratePriority + = RehydratePriority.fromString(reader.getStringElement()); + } else if ("LastAccessTime".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.lastAccessedOn + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("ImmutabilityPolicyUntilDate".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.immutabilityPolicyExpiresOn + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("ImmutabilityPolicyMode".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.immutabilityPolicyMode + = BlobImmutabilityPolicyMode.fromString(reader.getStringElement()); + } else if ("LegalHold".equals(elementName.getLocalPart())) { + deserializedBlobItemPropertiesInternal.legalHold = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedBlobItemPropertiesInternal; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobName.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobName.java index a230bd296b0ae..7cba83c20c817 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobName.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobName.java @@ -5,31 +5,36 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlWriter; +import javax.xml.stream.XMLStreamException; -/** The BlobName model. */ -@JacksonXmlRootElement(localName = "BlobName") +/** + * The BlobName model. + */ @Fluent -public final class BlobName { +public final class BlobName implements XmlSerializable { /* * Indicates if the blob name is encoded. */ - @JacksonXmlProperty(localName = "Encoded", isAttribute = true) private Boolean encoded; /* * The name of the blob. */ - @JacksonXmlText private String content; + private String content; - /** Creates an instance of BlobName class. */ - public BlobName() {} + /** + * Creates an instance of BlobName class. + */ + public BlobName() { + } /** * Get the encoded property: Indicates if the blob name is encoded. - * + * * @return the encoded value. */ public Boolean isEncoded() { @@ -38,7 +43,7 @@ public Boolean isEncoded() { /** * Set the encoded property: Indicates if the blob name is encoded. - * + * * @param encoded the encoded value to set. * @return the BlobName object itself. */ @@ -49,7 +54,7 @@ public BlobName setEncoded(Boolean encoded) { /** * Get the content property: The name of the blob. - * + * * @return the content value. */ public String getContent() { @@ -58,7 +63,7 @@ public String getContent() { /** * Set the content property: The name of the blob. - * + * * @param content the content value to set. * @return the BlobName object itself. */ @@ -66,4 +71,51 @@ public BlobName setContent(String content) { this.content = content; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobName" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanAttribute("Encoded", this.encoded); + xmlWriter.writeString(this.content); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobName from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobName if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobName. + */ + public static BlobName fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobName from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobName if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the BlobName. + */ + public static BlobName fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobName" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobName deserializedBlobName = new BlobName(); + deserializedBlobName.encoded = reader.getNullableAttribute(null, "Encoded", Boolean::parseBoolean); + deserializedBlobName.content = reader.getStringElement(); + + return deserializedBlobName; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java index 93e09c9ef0532..14c1512fd8034 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java @@ -5,25 +5,33 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The BlobPrefixInternal model. */ -@JacksonXmlRootElement(localName = "BlobPrefixInternal") +/** + * The BlobPrefixInternal model. + */ @Fluent -public final class BlobPrefixInternal { +public final class BlobPrefixInternal implements XmlSerializable { /* * The Name property. */ - @JsonProperty(value = "Name", required = true) private BlobName name; - /** Creates an instance of BlobPrefixInternal class. */ - public BlobPrefixInternal() {} + /** + * Creates an instance of BlobPrefixInternal class. + */ + public BlobPrefixInternal() { + } /** * Get the name property: The Name property. - * + * * @return the name value. */ public BlobName getName() { @@ -32,7 +40,7 @@ public BlobName getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobPrefixInternal object itself. */ @@ -40,4 +48,59 @@ public BlobPrefixInternal setName(BlobName name) { this.name = name; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefixInternal" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.name, "Name"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobPrefixInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobPrefixInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobPrefixInternal. + */ + public static BlobPrefixInternal fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobPrefixInternal from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobPrefixInternal if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobPrefixInternal. + */ + public static BlobPrefixInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefixInternal" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobPrefixInternal deserializedBlobPrefixInternal = new BlobPrefixInternal(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlobPrefixInternal.name = BlobName.fromXml(reader, "Name"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobPrefixInternal; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java new file mode 100644 index 0000000000000..40d452c9dd172 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.storage.blob.models.BlobSignedIdentifier; +import java.util.List; + +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import java.util.ArrayList; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * A wrapper around List<BlobSignedIdentifier> which provides top-level metadata for serialization. + */ +public final class BlobSignedIdentifierWrapper implements XmlSerializable { + private final List signedIdentifiers; + + /** + * Creates an instance of BlobSignedIdentifierWrapper. + * + * @param signedIdentifiers the list. + */ + public BlobSignedIdentifierWrapper(List signedIdentifiers) { + this.signedIdentifiers = signedIdentifiers; + } + + /** + * Get the List<BlobSignedIdentifier> contained in this wrapper. + * + * @return the List<BlobSignedIdentifier>. + */ + public List items() { + return signedIdentifiers; + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifiers" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (signedIdentifiers != null) { + for (BlobSignedIdentifier element : signedIdentifiers) { + xmlWriter.writeXml(element, "SignedIdentifier"); + } + } + return xmlWriter.writeEndElement(); + } + + public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifiers" : rootElementName; + return xmlReader.readObject(rootElementName, reader -> { + List items = null; + + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("SignedIdentifier".equals(elementName.getLocalPart())) { + if (items == null) { + items = new ArrayList<>(); + } + + items.add(BlobSignedIdentifier.fromXml(reader)); + } else { + reader.nextElement(); + } + } + return new BlobSignedIdentifierWrapper(items); + }); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java index 0fca97e23a1cf..8eeddfd3daab9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java @@ -5,31 +5,38 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The BlobTag model. */ -@JacksonXmlRootElement(localName = "Tag") +/** + * The BlobTag model. + */ @Fluent -public final class BlobTag { +public final class BlobTag implements XmlSerializable { /* * The Key property. */ - @JsonProperty(value = "Key", required = true) private String key; /* * The Value property. */ - @JsonProperty(value = "Value", required = true) private String value; - /** Creates an instance of BlobTag class. */ - public BlobTag() {} + /** + * Creates an instance of BlobTag class. + */ + public BlobTag() { + } /** * Get the key property: The Key property. - * + * * @return the key value. */ public String getKey() { @@ -38,7 +45,7 @@ public String getKey() { /** * Set the key property: The Key property. - * + * * @param key the key value to set. * @return the BlobTag object itself. */ @@ -49,7 +56,7 @@ public BlobTag setKey(String key) { /** * Get the value property: The Value property. - * + * * @return the value value. */ public String getValue() { @@ -58,7 +65,7 @@ public String getValue() { /** * Set the value property: The Value property. - * + * * @param value the value value to set. * @return the BlobTag object itself. */ @@ -66,4 +73,62 @@ public BlobTag setValue(String value) { this.value = value; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tag" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Key", this.key); + xmlWriter.writeStringElement("Value", this.value); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobTag from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobTag if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobTag. + */ + public static BlobTag fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobTag from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobTag if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobTag. + */ + public static BlobTag fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tag" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobTag deserializedBlobTag = new BlobTag(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Key".equals(elementName.getLocalPart())) { + deserializedBlobTag.key = reader.getStringElement(); + } else if ("Value".equals(elementName.getLocalPart())) { + deserializedBlobTag.value = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlobTag; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java index d8f73524ba378..5293d1d737892 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java @@ -5,56 +5,123 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Blob tags. */ -@JacksonXmlRootElement(localName = "Tags") +/** + * Blob tags. + */ @Fluent -public final class BlobTags { - private static final class TagSetWrapper { - @JacksonXmlProperty(localName = "Tag") - private final List items; - - @JsonCreator - private TagSetWrapper(@JacksonXmlProperty(localName = "Tag") List items) { - this.items = items; - } - } - +public final class BlobTags implements XmlSerializable { /* * The BlobTagSet property. */ - @JsonProperty(value = "TagSet", required = true) - private TagSetWrapper blobTagSet; + private List blobTagSet; - /** Creates an instance of BlobTags class. */ - public BlobTags() {} + /** + * Creates an instance of BlobTags class. + */ + public BlobTags() { + } /** * Get the blobTagSet property: The BlobTagSet property. - * + * * @return the blobTagSet value. */ public List getBlobTagSet() { if (this.blobTagSet == null) { - this.blobTagSet = new TagSetWrapper(new ArrayList()); + this.blobTagSet = new ArrayList<>(); } - return this.blobTagSet.items; + return this.blobTagSet; } /** * Set the blobTagSet property: The BlobTagSet property. - * + * * @param blobTagSet the blobTagSet value to set. * @return the BlobTags object itself. */ public BlobTags setBlobTagSet(List blobTagSet) { - this.blobTagSet = new TagSetWrapper(blobTagSet); + this.blobTagSet = blobTagSet; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tags" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.blobTagSet != null) { + xmlWriter.writeStartElement("TagSet"); + for (BlobTag element : this.blobTagSet) { + xmlWriter.writeXml(element, "Tag"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobTags from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobTags if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobTags. + */ + public static BlobTags fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobTags from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobTags if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobTags. + */ + public static BlobTags fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Tags" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobTags deserializedBlobTags = new BlobTags(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("TagSet".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Tag".equals(elementName.getLocalPart())) { + if (deserializedBlobTags.blobTagSet == null) { + deserializedBlobTags.blobTagSet = new ArrayList<>(); + } + deserializedBlobTags.blobTagSet.add(BlobTag.fromXml(reader, "Tag")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedBlobTags; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLHeaders.java index 0cb2c08fe4d82..e8cf0fef635ec 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsAbortCopyFromURLHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsAbortCopyFromURLHeaders model. + */ @Fluent public final class BlobsAbortCopyFromURLHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsAbortCopyFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsAbortCopyFromURLHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public BlobsAbortCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -82,7 +75,7 @@ public BlobsAbortCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -102,7 +95,7 @@ public BlobsAbortCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ @@ -122,7 +115,7 @@ public BlobsAbortCopyFromURLHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsAbortCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java index 14498e3a2d0a5..0f1959c9b572d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsAcquireLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsAcquireLeaseHeaders model. + */ @Fluent public final class BlobsAcquireLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-id property. */ - @JsonProperty(value = "x-ms-lease-id") private String xMsLeaseId; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsAcquireLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { @@ -78,7 +68,7 @@ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -88,7 +78,7 @@ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -97,7 +87,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -108,7 +98,7 @@ public BlobsAcquireLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -117,7 +107,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -128,7 +118,7 @@ public BlobsAcquireLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -137,7 +127,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -148,7 +138,7 @@ public BlobsAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +150,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -175,7 +165,7 @@ public BlobsAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -184,7 +174,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -195,7 +185,7 @@ public BlobsAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -204,7 +194,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ @@ -215,7 +205,7 @@ public BlobsAcquireLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -227,7 +217,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsAcquireLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java index 81beb7b94d595..3fe87c9ac0aa6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsBreakLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsBreakLeaseHeaders model. + */ @Fluent public final class BlobsBreakLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-time property. */ - @JsonProperty(value = "x-ms-lease-time") private Integer xMsLeaseTime; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsBreakLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { @@ -81,7 +71,7 @@ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -91,7 +81,7 @@ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -100,7 +90,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -111,7 +101,7 @@ public BlobsBreakLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -120,7 +110,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -131,7 +121,7 @@ public BlobsBreakLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @return the xMsLeaseTime value. */ public Integer getXMsLeaseTime() { @@ -140,7 +130,7 @@ public Integer getXMsLeaseTime() { /** * Set the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @param xMsLeaseTime the xMsLeaseTime value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -151,7 +141,7 @@ public BlobsBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -163,7 +153,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -178,7 +168,7 @@ public BlobsBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -187,7 +177,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -198,7 +188,7 @@ public BlobsBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -207,7 +197,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsBreakLeaseHeaders object itself. */ @@ -218,7 +208,7 @@ public BlobsBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -230,7 +220,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsBreakLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java index ea0da597df59a..4ffc020527571 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsChangeLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsChangeLeaseHeaders model. + */ @Fluent public final class BlobsChangeLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-id property. */ - @JsonProperty(value = "x-ms-lease-id") private String xMsLeaseId; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsChangeLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { @@ -78,7 +68,7 @@ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -88,7 +78,7 @@ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -97,7 +87,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -108,7 +98,7 @@ public BlobsChangeLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -117,7 +107,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -128,7 +118,7 @@ public BlobsChangeLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -137,7 +127,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -148,7 +138,7 @@ public BlobsChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +150,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -175,7 +165,7 @@ public BlobsChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -184,7 +174,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -195,7 +185,7 @@ public BlobsChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -204,7 +194,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsChangeLeaseHeaders object itself. */ @@ -215,7 +205,7 @@ public BlobsChangeLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -227,7 +217,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsChangeLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLHeaders.java index e81ef340d52b1..822a4004a7557 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLHeaders.java @@ -9,85 +9,72 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The BlobsCopyFromURLHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsCopyFromURLHeaders model. + */ @Fluent public final class BlobsCopyFromURLHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-copy-id property. */ - @JsonProperty(value = "x-ms-copy-id") private String xMsCopyId; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-copy-status property. */ - @JsonProperty(value = "x-ms-copy-status") - private String xMsCopyStatus; + private String xMsCopyStatus = "success"; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -100,14 +87,12 @@ public final class BlobsCopyFromURLHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsCopyFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsCopyFromURLHeaders(HttpHeaders rawHeaders) { @@ -124,7 +109,7 @@ public BlobsCopyFromURLHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -139,7 +124,7 @@ public BlobsCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -148,7 +133,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -159,7 +144,7 @@ public BlobsCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -168,7 +153,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -179,7 +164,7 @@ public BlobsCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -188,7 +173,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -199,7 +184,7 @@ public BlobsCopyFromURLHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -208,7 +193,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -219,7 +204,7 @@ public BlobsCopyFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -231,7 +216,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -246,7 +231,7 @@ public BlobsCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -255,7 +240,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -266,7 +251,7 @@ public BlobsCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public String getXMsCopyStatus() { @@ -275,7 +260,7 @@ public String getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -286,7 +271,7 @@ public BlobsCopyFromURLHeaders setXMsCopyStatus(String xMsCopyStatus) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -295,7 +280,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -306,7 +291,7 @@ public BlobsCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -315,7 +300,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -326,7 +311,7 @@ public BlobsCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -338,7 +323,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -353,7 +338,7 @@ public BlobsCopyFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -362,7 +347,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsCopyFromURLHeaders object itself. */ @@ -373,7 +358,7 @@ public BlobsCopyFromURLHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -382,7 +367,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java index 5b5807797bf65..8292c86cb40c0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsCreateSnapshotHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsCreateSnapshotHeaders model. + */ @Fluent public final class BlobsCreateSnapshotHeaders { /* * The x-ms-snapshot property. */ - @JsonProperty(value = "x-ms-snapshot") private String xMsSnapshot; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_SNAPSHOT = HttpHeaderName.fromString("x-ms-snapshot"); @@ -76,15 +66,13 @@ public final class BlobsCreateSnapshotHeaders { private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsCreateSnapshotHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { @@ -96,7 +84,7 @@ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -110,7 +98,7 @@ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { /** * Get the xMsSnapshot property: The x-ms-snapshot property. - * + * * @return the xMsSnapshot value. */ public String getXMsSnapshot() { @@ -119,7 +107,7 @@ public String getXMsSnapshot() { /** * Set the xMsSnapshot property: The x-ms-snapshot property. - * + * * @param xMsSnapshot the xMsSnapshot value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -130,7 +118,7 @@ public BlobsCreateSnapshotHeaders setXMsSnapshot(String xMsSnapshot) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -139,7 +127,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -150,7 +138,7 @@ public BlobsCreateSnapshotHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -159,7 +147,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -170,7 +158,7 @@ public BlobsCreateSnapshotHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -182,7 +170,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -197,7 +185,7 @@ public BlobsCreateSnapshotHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -206,7 +194,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -217,7 +205,7 @@ public BlobsCreateSnapshotHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -226,7 +214,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -237,7 +225,7 @@ public BlobsCreateSnapshotHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -246,7 +234,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -257,7 +245,7 @@ public BlobsCreateSnapshotHeaders setXMsRequestServerEncrypted(Boolean xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -266,7 +254,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ @@ -277,7 +265,7 @@ public BlobsCreateSnapshotHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -289,7 +277,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsCreateSnapshotHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java index 428966783c1bc..87bc9f477bb07 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsDeleteHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsDeleteHeaders model. + */ @Fluent public final class BlobsDeleteHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public BlobsDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -82,7 +75,7 @@ public BlobsDeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -102,7 +95,7 @@ public BlobsDeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDeleteHeaders object itself. */ @@ -122,7 +115,7 @@ public BlobsDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java index 278d1bfd53e68..9a88ef2453e5d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsDeleteImmutabilityPolicyHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsDeleteImmutabilityPolicyHeaders model. + */ @Fluent public final class BlobsDeleteImmutabilityPolicyHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDeleteImmutabilityPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -82,7 +75,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -102,7 +95,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ @@ -122,7 +115,7 @@ public BlobsDeleteImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java index 8f47f7c35b34d..2fd345c9cf6dd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java @@ -5,7 +5,6 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.HeaderCollection; import com.azure.core.http.HttpHeader; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; @@ -16,279 +15,234 @@ import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; import java.util.HashMap; import java.util.Map; -/** The BlobsDownloadHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsDownloadHeaders model. + */ @Fluent public final class BlobsDownloadHeaders { /* * The x-ms-is-current-version property. */ - @JsonProperty(value = "x-ms-is-current-version") private Boolean xMsIsCurrentVersion; /* * The x-ms-lease-status property. */ - @JsonProperty(value = "x-ms-lease-status") private LeaseStatusType xMsLeaseStatus; /* * The x-ms-tag-count property. */ - @JsonProperty(value = "x-ms-tag-count") private Long xMsTagCount; /* * The Content-Range property. */ - @JsonProperty(value = "Content-Range") private String contentRange; /* * The x-ms-lease-state property. */ - @JsonProperty(value = "x-ms-lease-state") private LeaseStateType xMsLeaseState; /* * The x-ms-blob-sealed property. */ - @JsonProperty(value = "x-ms-blob-sealed") private Boolean xMsBlobSealed; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-blob-type property. */ - @JsonProperty(value = "x-ms-blob-type") private BlobType xMsBlobType; /* * The x-ms-immutability-policy-mode property. */ - @JsonProperty(value = "x-ms-immutability-policy-mode") private String xMsImmutabilityPolicyMode; /* * The Content-Encoding property. */ - @JsonProperty(value = "Content-Encoding") private String contentEncoding; /* * The x-ms-copy-status-description property. */ - @JsonProperty(value = "x-ms-copy-status-description") private String xMsCopyStatusDescription; /* * The x-ms-creation-time property. */ - @JsonProperty(value = "x-ms-creation-time") private DateTimeRfc1123 xMsCreationTime; /* * The x-ms-lease-duration property. */ - @JsonProperty(value = "x-ms-lease-duration") private LeaseDurationType xMsLeaseDuration; /* * The Content-Length property. */ - @JsonProperty(value = "Content-Length") private Long contentLength; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; /* * The x-ms-last-access-time property. */ - @JsonProperty(value = "x-ms-last-access-time") private DateTimeRfc1123 xMsLastAccessTime; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-copy-id property. */ - @JsonProperty(value = "x-ms-copy-id") private String xMsCopyId; /* * The x-ms-copy-source property. */ - @JsonProperty(value = "x-ms-copy-source") private String xMsCopySource; /* * The x-ms-immutability-policy-until-date property. */ - @JsonProperty(value = "x-ms-immutability-policy-until-date") private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The x-ms-copy-progress property. */ - @JsonProperty(value = "x-ms-copy-progress") private String xMsCopyProgress; /* * The x-ms-blob-committed-block-count property. */ - @JsonProperty(value = "x-ms-blob-committed-block-count") private Integer xMsBlobCommittedBlockCount; /* * The x-ms-blob-content-md5 property. */ - @JsonProperty(value = "x-ms-blob-content-md5") private byte[] xMsBlobContentMd5; /* * The x-ms-meta- property. */ - @HeaderCollection("x-ms-meta-") private Map xMsMeta; /* * The x-ms-legal-hold property. */ - @JsonProperty(value = "x-ms-legal-hold") private Boolean xMsLegalHold; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-copy-completion-time property. */ - @JsonProperty(value = "x-ms-copy-completion-time") private DateTimeRfc1123 xMsCopyCompletionTime; /* * The Accept-Ranges property. */ - @JsonProperty(value = "Accept-Ranges") private String acceptRanges; /* * The x-ms-server-encrypted property. */ - @JsonProperty(value = "x-ms-server-encrypted") private Boolean xMsServerEncrypted; /* * The x-ms-or-policy-id property. */ - @JsonProperty(value = "x-ms-or-policy-id") private String xMsOrPolicyId; /* * The Cache-Control property. */ - @JsonProperty(value = "Cache-Control") private String cacheControl; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Content-Disposition property. */ - @JsonProperty(value = "Content-Disposition") private String contentDisposition; /* * The x-ms-copy-status property. */ - @JsonProperty(value = "x-ms-copy-status") private CopyStatusType xMsCopyStatus; /* * The Content-Language property. */ - @JsonProperty(value = "Content-Language") private String contentLanguage; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The x-ms-or- property. */ - @HeaderCollection("x-ms-or-") private Map xMsOr; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_IS_CURRENT_VERSION = HttpHeaderName.fromString("x-ms-is-current-version"); @@ -303,23 +257,21 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); - private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE = - HttpHeaderName.fromString("x-ms-immutability-policy-mode"); + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE + = HttpHeaderName.fromString("x-ms-immutability-policy-mode"); - private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION = - HttpHeaderName.fromString("x-ms-copy-status-description"); + private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION + = HttpHeaderName.fromString("x-ms-copy-status-description"); private static final HttpHeaderName X_MS_CREATION_TIME = HttpHeaderName.fromString("x-ms-creation-time"); private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - private static final HttpHeaderName X_MS_LAST_ACCESS_TIME = HttpHeaderName.fromString("x-ms-last-access-time"); private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -328,25 +280,25 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); - private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE = - HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE + = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); private static final HttpHeaderName X_MS_COPY_PROGRESS = HttpHeaderName.fromString("x-ms-copy-progress"); - private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = - HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); private static final HttpHeaderName X_MS_BLOB_CONTENT_MD5 = HttpHeaderName.fromString("x-ms-blob-content-md5"); private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); - private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME = - HttpHeaderName.fromString("x-ms-copy-completion-time"); + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME + = HttpHeaderName.fromString("x-ms-copy-completion-time"); private static final HttpHeaderName X_MS_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-server-encrypted"); @@ -359,7 +311,7 @@ public final class BlobsDownloadHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsDownloadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { @@ -409,7 +361,7 @@ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { if (contentLength != null) { this.contentLength = Long.parseLong(contentLength); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); if (xMsLastAccessTime != null) { @@ -491,7 +443,7 @@ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { /** * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @return the xMsIsCurrentVersion value. */ public Boolean isXMsIsCurrentVersion() { @@ -500,7 +452,7 @@ public Boolean isXMsIsCurrentVersion() { /** * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -511,7 +463,7 @@ public BlobsDownloadHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -520,7 +472,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -531,7 +483,7 @@ public BlobsDownloadHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { /** * Get the xMsTagCount property: The x-ms-tag-count property. - * + * * @return the xMsTagCount value. */ public Long getXMsTagCount() { @@ -540,7 +492,7 @@ public Long getXMsTagCount() { /** * Set the xMsTagCount property: The x-ms-tag-count property. - * + * * @param xMsTagCount the xMsTagCount value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -551,7 +503,7 @@ public BlobsDownloadHeaders setXMsTagCount(Long xMsTagCount) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -560,7 +512,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -571,7 +523,7 @@ public BlobsDownloadHeaders setContentRange(String contentRange) { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -580,7 +532,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -591,7 +543,7 @@ public BlobsDownloadHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -600,7 +552,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -611,7 +563,7 @@ public BlobsDownloadHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -623,7 +575,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -638,7 +590,7 @@ public BlobsDownloadHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -647,7 +599,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -658,7 +610,7 @@ public BlobsDownloadHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -667,7 +619,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -678,7 +630,7 @@ public BlobsDownloadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -687,7 +639,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -698,7 +650,7 @@ public BlobsDownloadHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public String getXMsImmutabilityPolicyMode() { @@ -707,7 +659,7 @@ public String getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -718,7 +670,7 @@ public BlobsDownloadHeaders setXMsImmutabilityPolicyMode(String xMsImmutabilityP /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -727,7 +679,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -738,7 +690,7 @@ public BlobsDownloadHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -747,7 +699,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -758,7 +710,7 @@ public BlobsDownloadHeaders setXMsCopyStatusDescription(String xMsCopyStatusDesc /** * Get the xMsCreationTime property: The x-ms-creation-time property. - * + * * @return the xMsCreationTime value. */ public OffsetDateTime getXMsCreationTime() { @@ -770,7 +722,7 @@ public OffsetDateTime getXMsCreationTime() { /** * Set the xMsCreationTime property: The x-ms-creation-time property. - * + * * @param xMsCreationTime the xMsCreationTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -785,7 +737,7 @@ public BlobsDownloadHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -794,7 +746,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -805,7 +757,7 @@ public BlobsDownloadHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDurati /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -814,7 +766,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -825,7 +777,7 @@ public BlobsDownloadHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -834,7 +786,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -845,7 +797,7 @@ public BlobsDownloadHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -854,7 +806,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -865,7 +817,7 @@ public BlobsDownloadHeaders setContentType(String contentType) { /** * Get the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @return the xMsLastAccessTime value. */ public OffsetDateTime getXMsLastAccessTime() { @@ -877,7 +829,7 @@ public OffsetDateTime getXMsLastAccessTime() { /** * Set the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @param xMsLastAccessTime the xMsLastAccessTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -892,7 +844,7 @@ public BlobsDownloadHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTim /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -901,7 +853,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -912,7 +864,7 @@ public BlobsDownloadHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -921,7 +873,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -932,7 +884,7 @@ public BlobsDownloadHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -941,7 +893,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -952,7 +904,7 @@ public BlobsDownloadHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -964,7 +916,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -979,7 +931,7 @@ public BlobsDownloadHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMs /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -988,7 +940,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -999,7 +951,7 @@ public BlobsDownloadHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -1008,7 +960,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1019,7 +971,7 @@ public BlobsDownloadHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -1028,7 +980,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1039,7 +991,7 @@ public BlobsDownloadHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -1048,7 +1000,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1059,7 +1011,7 @@ public BlobsDownloadHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommitt /** * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @return the xMsBlobContentMd5 value. */ public byte[] getXMsBlobContentMd5() { @@ -1068,7 +1020,7 @@ public byte[] getXMsBlobContentMd5() { /** * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1079,7 +1031,7 @@ public BlobsDownloadHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -1088,7 +1040,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1099,7 +1051,7 @@ public BlobsDownloadHeaders setXMsMeta(Map xMsMeta) { /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -1108,7 +1060,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1119,7 +1071,7 @@ public BlobsDownloadHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -1131,7 +1083,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1146,7 +1098,7 @@ public BlobsDownloadHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -1155,7 +1107,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1166,7 +1118,7 @@ public BlobsDownloadHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -1178,7 +1130,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1193,7 +1145,7 @@ public BlobsDownloadHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompl /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -1202,7 +1154,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1213,7 +1165,7 @@ public BlobsDownloadHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -1222,7 +1174,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1233,7 +1185,7 @@ public BlobsDownloadHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { /** * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @return the xMsOrPolicyId value. */ public String getXMsOrPolicyId() { @@ -1242,7 +1194,7 @@ public String getXMsOrPolicyId() { /** * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @param xMsOrPolicyId the xMsOrPolicyId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1253,7 +1205,7 @@ public BlobsDownloadHeaders setXMsOrPolicyId(String xMsOrPolicyId) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -1262,7 +1214,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1273,7 +1225,7 @@ public BlobsDownloadHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -1282,7 +1234,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1293,7 +1245,7 @@ public BlobsDownloadHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -1302,7 +1254,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1313,7 +1265,7 @@ public BlobsDownloadHeaders setContentDisposition(String contentDisposition) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -1322,7 +1274,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1333,7 +1285,7 @@ public BlobsDownloadHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -1342,7 +1294,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1353,7 +1305,7 @@ public BlobsDownloadHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -1362,7 +1314,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1373,7 +1325,7 @@ public BlobsDownloadHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the xMsOr property: The x-ms-or- property. - * + * * @return the xMsOr value. */ public Map getXMsOr() { @@ -1382,7 +1334,7 @@ public Map getXMsOr() { /** * Set the xMsOr property: The x-ms-or- property. - * + * * @param xMsOr the xMsOr value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1393,7 +1345,7 @@ public BlobsDownloadHeaders setXMsOr(Map xMsOr) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -1402,7 +1354,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsDownloadHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java index 992e8d2cb9068..934be1715f63c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java @@ -10,70 +10,53 @@ import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.models.AccountKind; import com.azure.storage.blob.models.SkuName; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsGetAccountInfoHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsGetAccountInfoHeaders model. + */ @Fluent public final class BlobsGetAccountInfoHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-account-kind property. */ - @JsonProperty(value = "x-ms-account-kind") private AccountKind xMsAccountKind; - /* - * The x-ms-is-hns-enabled property. - */ - @JsonProperty(value = "x-ms-is-hns-enabled") - private Boolean xMsIsHnsEnabled; - /* * The x-ms-sku-name property. */ - @JsonProperty(value = "x-ms-sku-name") private SkuName xMsSkuName; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_ACCOUNT_KIND = HttpHeaderName.fromString("x-ms-account-kind"); - private static final HttpHeaderName X_MS_IS_HNS_ENABLED = HttpHeaderName.fromString("x-ms-is-hns-enabled"); - private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -82,15 +65,11 @@ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { if (xMsAccountKind != null) { this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); } - String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); - if (xMsIsHnsEnabled != null) { - this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); - } String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); if (xMsSkuName != null) { this.xMsSkuName = SkuName.fromString(xMsSkuName); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -100,7 +79,7 @@ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -109,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -120,7 +99,7 @@ public BlobsGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -129,7 +108,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -138,29 +117,9 @@ public BlobsGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) return this; } - /** - * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * - * @return the xMsIsHnsEnabled value. - */ - public Boolean isXMsIsHnsEnabled() { - return this.xMsIsHnsEnabled; - } - - /** - * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * - * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. - * @return the BlobsGetAccountInfoHeaders object itself. - */ - public BlobsGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { - this.xMsIsHnsEnabled = xMsIsHnsEnabled; - return this; - } - /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -169,7 +128,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -180,7 +139,7 @@ public BlobsGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -189,7 +148,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -200,7 +159,7 @@ public BlobsGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -209,7 +168,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ @@ -220,7 +179,7 @@ public BlobsGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -232,7 +191,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java index 550e6d4db89f3..1a6853f096951 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java @@ -5,7 +5,6 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.HeaderCollection; import com.azure.core.http.HttpHeader; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; @@ -17,317 +16,267 @@ import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; import java.util.HashMap; import java.util.Map; -/** The BlobsGetPropertiesHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsGetPropertiesHeaders model. + */ @Fluent public final class BlobsGetPropertiesHeaders { /* * The x-ms-is-current-version property. */ - @JsonProperty(value = "x-ms-is-current-version") private Boolean xMsIsCurrentVersion; /* * The x-ms-lease-status property. */ - @JsonProperty(value = "x-ms-lease-status") private LeaseStatusType xMsLeaseStatus; /* * The x-ms-copy-destination-snapshot property. */ - @JsonProperty(value = "x-ms-copy-destination-snapshot") private String xMsCopyDestinationSnapshot; /* * The x-ms-lease-state property. */ - @JsonProperty(value = "x-ms-lease-state") private LeaseStateType xMsLeaseState; /* * The x-ms-blob-sealed property. */ - @JsonProperty(value = "x-ms-blob-sealed") private Boolean xMsBlobSealed; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-access-tier-change-time property. */ - @JsonProperty(value = "x-ms-access-tier-change-time") private DateTimeRfc1123 xMsAccessTierChangeTime; /* * The x-ms-blob-type property. */ - @JsonProperty(value = "x-ms-blob-type") private BlobType xMsBlobType; /* * The Content-Encoding property. */ - @JsonProperty(value = "Content-Encoding") private String contentEncoding; /* * The x-ms-creation-time property. */ - @JsonProperty(value = "x-ms-creation-time") private DateTimeRfc1123 xMsCreationTime; /* * The x-ms-incremental-copy property. */ - @JsonProperty(value = "x-ms-incremental-copy") private Boolean xMsIncrementalCopy; /* * The x-ms-lease-duration property. */ - @JsonProperty(value = "x-ms-lease-duration") private LeaseDurationType xMsLeaseDuration; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-copy-id property. */ - @JsonProperty(value = "x-ms-copy-id") private String xMsCopyId; /* * The x-ms-immutability-policy-until-date property. */ - @JsonProperty(value = "x-ms-immutability-policy-until-date") private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The x-ms-blob-committed-block-count property. */ - @JsonProperty(value = "x-ms-blob-committed-block-count") private Integer xMsBlobCommittedBlockCount; /* * The x-ms-legal-hold property. */ - @JsonProperty(value = "x-ms-legal-hold") private Boolean xMsLegalHold; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-or-policy-id property. */ - @JsonProperty(value = "x-ms-or-policy-id") private String xMsOrPolicyId; /* * The Cache-Control property. */ - @JsonProperty(value = "Cache-Control") private String cacheControl; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Content-Disposition property. */ - @JsonProperty(value = "Content-Disposition") private String contentDisposition; /* * The Content-Language property. */ - @JsonProperty(value = "Content-Language") private String contentLanguage; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The x-ms-or- property. */ - @HeaderCollection("x-ms-or-") private Map xMsOr; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; /* * The x-ms-tag-count property. */ - @JsonProperty(value = "x-ms-tag-count") private Long xMsTagCount; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-access-tier-inferred property. */ - @JsonProperty(value = "x-ms-access-tier-inferred") private Boolean xMsAccessTierInferred; /* * The x-ms-immutability-policy-mode property. */ - @JsonProperty(value = "x-ms-immutability-policy-mode") private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; /* * The x-ms-access-tier property. */ - @JsonProperty(value = "x-ms-access-tier") private String xMsAccessTier; /* * The x-ms-copy-status-description property. */ - @JsonProperty(value = "x-ms-copy-status-description") private String xMsCopyStatusDescription; /* * The Content-Length property. */ - @JsonProperty(value = "Content-Length") private Long contentLength; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; /* * The x-ms-last-access-time property. */ - @JsonProperty(value = "x-ms-last-access-time") private DateTimeRfc1123 xMsLastAccessTime; /* * The x-ms-copy-source property. */ - @JsonProperty(value = "x-ms-copy-source") private String xMsCopySource; /* * The x-ms-copy-progress property. */ - @JsonProperty(value = "x-ms-copy-progress") private String xMsCopyProgress; /* * The x-ms-meta- property. */ - @HeaderCollection("x-ms-meta-") private Map xMsMeta; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The x-ms-expiry-time property. */ - @JsonProperty(value = "x-ms-expiry-time") private DateTimeRfc1123 xMsExpiryTime; /* * The x-ms-copy-completion-time property. */ - @JsonProperty(value = "x-ms-copy-completion-time") private DateTimeRfc1123 xMsCopyCompletionTime; /* * The Accept-Ranges property. */ - @JsonProperty(value = "Accept-Ranges") private String acceptRanges; /* * The x-ms-server-encrypted property. */ - @JsonProperty(value = "x-ms-server-encrypted") private Boolean xMsServerEncrypted; /* * The x-ms-rehydrate-priority property. */ - @JsonProperty(value = "x-ms-rehydrate-priority") private String xMsRehydratePriority; /* * The x-ms-copy-status property. */ - @JsonProperty(value = "x-ms-copy-status") private CopyStatusType xMsCopyStatus; /* * The x-ms-archive-status property. */ - @JsonProperty(value = "x-ms-archive-status") private String xMsArchiveStatus; private static final HttpHeaderName X_MS_IS_CURRENT_VERSION = HttpHeaderName.fromString("x-ms-is-current-version"); private static final HttpHeaderName X_MS_LEASE_STATUS = HttpHeaderName.fromString("x-ms-lease-status"); - private static final HttpHeaderName X_MS_COPY_DESTINATION_SNAPSHOT = - HttpHeaderName.fromString("x-ms-copy-destination-snapshot"); + private static final HttpHeaderName X_MS_COPY_DESTINATION_SNAPSHOT + = HttpHeaderName.fromString("x-ms-copy-destination-snapshot"); private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); @@ -335,11 +284,11 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_ACCESS_TIER_CHANGE_TIME = - HttpHeaderName.fromString("x-ms-access-tier-change-time"); + private static final HttpHeaderName X_MS_ACCESS_TIER_CHANGE_TIME + = HttpHeaderName.fromString("x-ms-access-tier-change-time"); private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); @@ -353,14 +302,14 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); - private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE = - HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE + = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); - private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = - HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); @@ -370,18 +319,16 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_TAG_COUNT = HttpHeaderName.fromString("x-ms-tag-count"); - private static final HttpHeaderName X_MS_ACCESS_TIER_INFERRED = - HttpHeaderName.fromString("x-ms-access-tier-inferred"); + private static final HttpHeaderName X_MS_ACCESS_TIER_INFERRED + = HttpHeaderName.fromString("x-ms-access-tier-inferred"); - private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE = - HttpHeaderName.fromString("x-ms-immutability-policy-mode"); + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE + = HttpHeaderName.fromString("x-ms-immutability-policy-mode"); private static final HttpHeaderName X_MS_ACCESS_TIER = HttpHeaderName.fromString("x-ms-access-tier"); - private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION = - HttpHeaderName.fromString("x-ms-copy-status-description"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION + = HttpHeaderName.fromString("x-ms-copy-status-description"); private static final HttpHeaderName X_MS_LAST_ACCESS_TIME = HttpHeaderName.fromString("x-ms-last-access-time"); @@ -391,8 +338,8 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_EXPIRY_TIME = HttpHeaderName.fromString("x-ms-expiry-time"); - private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME = - HttpHeaderName.fromString("x-ms-copy-completion-time"); + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME + = HttpHeaderName.fromString("x-ms-copy-completion-time"); private static final HttpHeaderName X_MS_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-server-encrypted"); @@ -405,7 +352,7 @@ public final class BlobsGetPropertiesHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -500,7 +447,7 @@ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { if (contentLength != null) { this.contentLength = Long.parseLong(contentLength); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); if (xMsLastAccessTime != null) { @@ -551,7 +498,7 @@ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @return the xMsIsCurrentVersion value. */ public Boolean isXMsIsCurrentVersion() { @@ -560,7 +507,7 @@ public Boolean isXMsIsCurrentVersion() { /** * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * + * * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -571,7 +518,7 @@ public BlobsGetPropertiesHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVers /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -580,7 +527,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -591,7 +538,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatu /** * Get the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * + * * @return the xMsCopyDestinationSnapshot value. */ public String getXMsCopyDestinationSnapshot() { @@ -600,7 +547,7 @@ public String getXMsCopyDestinationSnapshot() { /** * Set the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * + * * @param xMsCopyDestinationSnapshot the xMsCopyDestinationSnapshot value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -611,7 +558,7 @@ public BlobsGetPropertiesHeaders setXMsCopyDestinationSnapshot(String xMsCopyDes /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -620,7 +567,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -631,7 +578,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) /** * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @return the xMsBlobSealed value. */ public Boolean isXMsBlobSealed() { @@ -640,7 +587,7 @@ public Boolean isXMsBlobSealed() { /** * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * + * * @param xMsBlobSealed the xMsBlobSealed value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -651,7 +598,7 @@ public BlobsGetPropertiesHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -660,7 +607,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -671,7 +618,7 @@ public BlobsGetPropertiesHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -680,7 +627,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -691,7 +638,7 @@ public BlobsGetPropertiesHeaders setXMsEncryptionKeySha256(String xMsEncryptionK /** * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * + * * @return the xMsAccessTierChangeTime value. */ public OffsetDateTime getXMsAccessTierChangeTime() { @@ -703,7 +650,7 @@ public OffsetDateTime getXMsAccessTierChangeTime() { /** * Set the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * + * * @param xMsAccessTierChangeTime the xMsAccessTierChangeTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -718,7 +665,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAc /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -727,7 +674,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -738,7 +685,7 @@ public BlobsGetPropertiesHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -747,7 +694,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -758,7 +705,7 @@ public BlobsGetPropertiesHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCreationTime property: The x-ms-creation-time property. - * + * * @return the xMsCreationTime value. */ public OffsetDateTime getXMsCreationTime() { @@ -770,7 +717,7 @@ public OffsetDateTime getXMsCreationTime() { /** * Set the xMsCreationTime property: The x-ms-creation-time property. - * + * * @param xMsCreationTime the xMsCreationTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -785,7 +732,7 @@ public BlobsGetPropertiesHeaders setXMsCreationTime(OffsetDateTime xMsCreationTi /** * Get the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * + * * @return the xMsIncrementalCopy value. */ public Boolean isXMsIncrementalCopy() { @@ -794,7 +741,7 @@ public Boolean isXMsIncrementalCopy() { /** * Set the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * + * * @param xMsIncrementalCopy the xMsIncrementalCopy value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -805,7 +752,7 @@ public BlobsGetPropertiesHeaders setXMsIncrementalCopy(Boolean xMsIncrementalCop /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -814,7 +761,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -825,7 +772,7 @@ public BlobsGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseD /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -834,7 +781,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -845,7 +792,7 @@ public BlobsGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -854,7 +801,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -865,7 +812,7 @@ public BlobsGetPropertiesHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -877,7 +824,7 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -892,7 +839,7 @@ public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTim /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -901,7 +848,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -912,7 +859,7 @@ public BlobsGetPropertiesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNu /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -921,7 +868,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -932,7 +879,7 @@ public BlobsGetPropertiesHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCo /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -941,7 +888,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -952,7 +899,7 @@ public BlobsGetPropertiesHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -961,7 +908,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -972,7 +919,7 @@ public BlobsGetPropertiesHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @return the xMsOrPolicyId value. */ public String getXMsOrPolicyId() { @@ -981,7 +928,7 @@ public String getXMsOrPolicyId() { /** * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * + * * @param xMsOrPolicyId the xMsOrPolicyId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -992,7 +939,7 @@ public BlobsGetPropertiesHeaders setXMsOrPolicyId(String xMsOrPolicyId) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -1001,7 +948,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1012,7 +959,7 @@ public BlobsGetPropertiesHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -1021,7 +968,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1032,7 +979,7 @@ public BlobsGetPropertiesHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -1041,7 +988,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1052,7 +999,7 @@ public BlobsGetPropertiesHeaders setContentDisposition(String contentDisposition /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -1061,7 +1008,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1072,7 +1019,7 @@ public BlobsGetPropertiesHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -1081,7 +1028,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1092,7 +1039,7 @@ public BlobsGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId /** * Get the xMsOr property: The x-ms-or- property. - * + * * @return the xMsOr value. */ public Map getXMsOr() { @@ -1101,7 +1048,7 @@ public Map getXMsOr() { /** * Set the xMsOr property: The x-ms-or- property. - * + * * @param xMsOr the xMsOr value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1112,7 +1059,7 @@ public BlobsGetPropertiesHeaders setXMsOr(Map xMsOr) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -1121,7 +1068,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1132,7 +1079,7 @@ public BlobsGetPropertiesHeaders setXMsEncryptionScope(String xMsEncryptionScope /** * Get the xMsTagCount property: The x-ms-tag-count property. - * + * * @return the xMsTagCount value. */ public Long getXMsTagCount() { @@ -1141,7 +1088,7 @@ public Long getXMsTagCount() { /** * Set the xMsTagCount property: The x-ms-tag-count property. - * + * * @param xMsTagCount the xMsTagCount value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1152,7 +1099,7 @@ public BlobsGetPropertiesHeaders setXMsTagCount(Long xMsTagCount) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -1164,7 +1111,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1179,7 +1126,7 @@ public BlobsGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * + * * @return the xMsAccessTierInferred value. */ public Boolean isXMsAccessTierInferred() { @@ -1188,7 +1135,7 @@ public Boolean isXMsAccessTierInferred() { /** * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * + * * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1199,7 +1146,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTierInferred(Boolean xMsAccessTierI /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { @@ -1208,19 +1155,19 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsGetPropertiesHeaders object itself. */ - public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyMode( - BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { + public BlobsGetPropertiesHeaders + setXMsImmutabilityPolicyMode(BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; return this; } /** * Get the xMsAccessTier property: The x-ms-access-tier property. - * + * * @return the xMsAccessTier value. */ public String getXMsAccessTier() { @@ -1229,7 +1176,7 @@ public String getXMsAccessTier() { /** * Set the xMsAccessTier property: The x-ms-access-tier property. - * + * * @param xMsAccessTier the xMsAccessTier value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1240,7 +1187,7 @@ public BlobsGetPropertiesHeaders setXMsAccessTier(String xMsAccessTier) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -1249,7 +1196,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1260,7 +1207,7 @@ public BlobsGetPropertiesHeaders setXMsCopyStatusDescription(String xMsCopyStatu /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -1269,7 +1216,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1280,7 +1227,7 @@ public BlobsGetPropertiesHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -1289,7 +1236,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1300,7 +1247,7 @@ public BlobsGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -1309,7 +1256,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1320,7 +1267,7 @@ public BlobsGetPropertiesHeaders setContentType(String contentType) { /** * Get the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @return the xMsLastAccessTime value. */ public OffsetDateTime getXMsLastAccessTime() { @@ -1332,7 +1279,7 @@ public OffsetDateTime getXMsLastAccessTime() { /** * Set the xMsLastAccessTime property: The x-ms-last-access-time property. - * + * * @param xMsLastAccessTime the xMsLastAccessTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1347,7 +1294,7 @@ public BlobsGetPropertiesHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAcce /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -1356,7 +1303,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1367,7 +1314,7 @@ public BlobsGetPropertiesHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -1376,7 +1323,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1387,7 +1334,7 @@ public BlobsGetPropertiesHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -1396,7 +1343,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1407,7 +1354,7 @@ public BlobsGetPropertiesHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -1419,7 +1366,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1434,7 +1381,7 @@ public BlobsGetPropertiesHeaders setDate(OffsetDateTime date) { /** * Get the xMsExpiryTime property: The x-ms-expiry-time property. - * + * * @return the xMsExpiryTime value. */ public OffsetDateTime getXMsExpiryTime() { @@ -1446,7 +1393,7 @@ public OffsetDateTime getXMsExpiryTime() { /** * Set the xMsExpiryTime property: The x-ms-expiry-time property. - * + * * @param xMsExpiryTime the xMsExpiryTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1461,7 +1408,7 @@ public BlobsGetPropertiesHeaders setXMsExpiryTime(OffsetDateTime xMsExpiryTime) /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -1473,7 +1420,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1488,7 +1435,7 @@ public BlobsGetPropertiesHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopy /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -1497,7 +1444,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1508,7 +1455,7 @@ public BlobsGetPropertiesHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -1517,7 +1464,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1528,7 +1475,7 @@ public BlobsGetPropertiesHeaders setXMsServerEncrypted(Boolean xMsServerEncrypte /** * Get the xMsRehydratePriority property: The x-ms-rehydrate-priority property. - * + * * @return the xMsRehydratePriority value. */ public String getXMsRehydratePriority() { @@ -1537,7 +1484,7 @@ public String getXMsRehydratePriority() { /** * Set the xMsRehydratePriority property: The x-ms-rehydrate-priority property. - * + * * @param xMsRehydratePriority the xMsRehydratePriority value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1548,7 +1495,7 @@ public BlobsGetPropertiesHeaders setXMsRehydratePriority(String xMsRehydratePrio /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -1557,7 +1504,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ @@ -1568,7 +1515,7 @@ public BlobsGetPropertiesHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) /** * Get the xMsArchiveStatus property: The x-ms-archive-status property. - * + * * @return the xMsArchiveStatus value. */ public String getXMsArchiveStatus() { @@ -1577,7 +1524,7 @@ public String getXMsArchiveStatus() { /** * Set the xMsArchiveStatus property: The x-ms-archive-status property. - * + * * @param xMsArchiveStatus the xMsArchiveStatus value to set. * @return the BlobsGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java index 2050b42a90b77..5eb10c0e01a65 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsGetTagsHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsGetTagsHeaders model. + */ @Fluent public final class BlobsGetTagsHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetTagsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -82,7 +75,7 @@ public BlobsGetTagsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -102,7 +95,7 @@ public BlobsGetTagsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsGetTagsHeaders object itself. */ @@ -122,7 +115,7 @@ public BlobsGetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsGetTagsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java index 47a57d13a30bd..7ef9d33b079ef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java @@ -5,7 +5,6 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.HeaderCollection; import com.azure.core.http.HttpHeader; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; @@ -16,231 +15,195 @@ import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; import java.util.HashMap; import java.util.Map; -/** The BlobsQueryHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsQueryHeaders model. + */ @Fluent public final class BlobsQueryHeaders { /* * The x-ms-lease-status property. */ - @JsonProperty(value = "x-ms-lease-status") private LeaseStatusType xMsLeaseStatus; /* * The Content-Range property. */ - @JsonProperty(value = "Content-Range") private String contentRange; /* * The x-ms-lease-state property. */ - @JsonProperty(value = "x-ms-lease-state") private LeaseStateType xMsLeaseState; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-blob-type property. */ - @JsonProperty(value = "x-ms-blob-type") private BlobType xMsBlobType; /* * The Content-Encoding property. */ - @JsonProperty(value = "Content-Encoding") private String contentEncoding; /* * The x-ms-copy-status-description property. */ - @JsonProperty(value = "x-ms-copy-status-description") private String xMsCopyStatusDescription; /* * The x-ms-lease-duration property. */ - @JsonProperty(value = "x-ms-lease-duration") private LeaseDurationType xMsLeaseDuration; /* * The Content-Length property. */ - @JsonProperty(value = "Content-Length") private Long contentLength; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-copy-id property. */ - @JsonProperty(value = "x-ms-copy-id") private String xMsCopyId; /* * The x-ms-copy-source property. */ - @JsonProperty(value = "x-ms-copy-source") private String xMsCopySource; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The x-ms-copy-progress property. */ - @JsonProperty(value = "x-ms-copy-progress") private String xMsCopyProgress; /* * The x-ms-blob-committed-block-count property. */ - @JsonProperty(value = "x-ms-blob-committed-block-count") private Integer xMsBlobCommittedBlockCount; /* * The x-ms-blob-content-md5 property. */ - @JsonProperty(value = "x-ms-blob-content-md5") private byte[] xMsBlobContentMd5; /* * The x-ms-meta- property. */ - @HeaderCollection("x-ms-meta-") private Map xMsMeta; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-copy-completion-time property. */ - @JsonProperty(value = "x-ms-copy-completion-time") private DateTimeRfc1123 xMsCopyCompletionTime; /* * The Accept-Ranges property. */ - @JsonProperty(value = "Accept-Ranges") private String acceptRanges; /* * The x-ms-server-encrypted property. */ - @JsonProperty(value = "x-ms-server-encrypted") private Boolean xMsServerEncrypted; /* * The Cache-Control property. */ - @JsonProperty(value = "Cache-Control") private String cacheControl; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Content-Disposition property. */ - @JsonProperty(value = "Content-Disposition") private String contentDisposition; /* * The x-ms-copy-status property. */ - @JsonProperty(value = "x-ms-copy-status") private CopyStatusType xMsCopyStatus; /* * The Content-Language property. */ - @JsonProperty(value = "Content-Language") private String contentLanguage; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_LEASE_STATUS = HttpHeaderName.fromString("x-ms-lease-status"); private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); - private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION = - HttpHeaderName.fromString("x-ms-copy-status-description"); + private static final HttpHeaderName X_MS_COPY_STATUS_DESCRIPTION + = HttpHeaderName.fromString("x-ms-copy-status-description"); private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); @@ -249,18 +212,18 @@ public final class BlobsQueryHeaders { private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); private static final HttpHeaderName X_MS_COPY_PROGRESS = HttpHeaderName.fromString("x-ms-copy-progress"); - private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = - HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT + = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); private static final HttpHeaderName X_MS_BLOB_CONTENT_MD5 = HttpHeaderName.fromString("x-ms-blob-content-md5"); - private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME = - HttpHeaderName.fromString("x-ms-copy-completion-time"); + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME + = HttpHeaderName.fromString("x-ms-copy-completion-time"); private static final HttpHeaderName X_MS_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-server-encrypted"); @@ -271,7 +234,7 @@ public final class BlobsQueryHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsQueryHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsQueryHeaders(HttpHeaders rawHeaders) { @@ -303,7 +266,7 @@ public BlobsQueryHeaders(HttpHeaders rawHeaders) { if (contentLength != null) { this.contentLength = Long.parseLong(contentLength); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); @@ -366,7 +329,7 @@ public BlobsQueryHeaders(HttpHeaders rawHeaders) { /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -375,7 +338,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the BlobsQueryHeaders object itself. */ @@ -386,7 +349,7 @@ public BlobsQueryHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ public String getContentRange() { @@ -395,7 +358,7 @@ public String getContentRange() { /** * Set the contentRange property: The Content-Range property. - * + * * @param contentRange the contentRange value to set. * @return the BlobsQueryHeaders object itself. */ @@ -406,7 +369,7 @@ public BlobsQueryHeaders setContentRange(String contentRange) { /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -415,7 +378,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the BlobsQueryHeaders object itself. */ @@ -426,7 +389,7 @@ public BlobsQueryHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -438,7 +401,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsQueryHeaders object itself. */ @@ -453,7 +416,7 @@ public BlobsQueryHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -462,7 +425,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -473,7 +436,7 @@ public BlobsQueryHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256 /** * Get the xMsBlobType property: The x-ms-blob-type property. - * + * * @return the xMsBlobType value. */ public BlobType getXMsBlobType() { @@ -482,7 +445,7 @@ public BlobType getXMsBlobType() { /** * Set the xMsBlobType property: The x-ms-blob-type property. - * + * * @param xMsBlobType the xMsBlobType value to set. * @return the BlobsQueryHeaders object itself. */ @@ -493,7 +456,7 @@ public BlobsQueryHeaders setXMsBlobType(BlobType xMsBlobType) { /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -502,7 +465,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: The Content-Encoding property. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsQueryHeaders object itself. */ @@ -513,7 +476,7 @@ public BlobsQueryHeaders setContentEncoding(String contentEncoding) { /** * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @return the xMsCopyStatusDescription value. */ public String getXMsCopyStatusDescription() { @@ -522,7 +485,7 @@ public String getXMsCopyStatusDescription() { /** * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * + * * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. * @return the BlobsQueryHeaders object itself. */ @@ -533,7 +496,7 @@ public BlobsQueryHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescrip /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -542,7 +505,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the BlobsQueryHeaders object itself. */ @@ -553,7 +516,7 @@ public BlobsQueryHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ public Long getContentLength() { @@ -562,7 +525,7 @@ public Long getContentLength() { /** * Set the contentLength property: The Content-Length property. - * + * * @param contentLength the contentLength value to set. * @return the BlobsQueryHeaders object itself. */ @@ -573,7 +536,7 @@ public BlobsQueryHeaders setContentLength(Long contentLength) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -582,7 +545,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -593,7 +556,7 @@ public BlobsQueryHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -602,7 +565,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlobsQueryHeaders object itself. */ @@ -613,7 +576,7 @@ public BlobsQueryHeaders setContentType(String contentType) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -622,7 +585,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsQueryHeaders object itself. */ @@ -633,7 +596,7 @@ public BlobsQueryHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -642,7 +605,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -653,7 +616,7 @@ public BlobsQueryHeaders setXMsCopyId(String xMsCopyId) { /** * Get the xMsCopySource property: The x-ms-copy-source property. - * + * * @return the xMsCopySource value. */ public String getXMsCopySource() { @@ -662,7 +625,7 @@ public String getXMsCopySource() { /** * Set the xMsCopySource property: The x-ms-copy-source property. - * + * * @param xMsCopySource the xMsCopySource value to set. * @return the BlobsQueryHeaders object itself. */ @@ -673,7 +636,7 @@ public BlobsQueryHeaders setXMsCopySource(String xMsCopySource) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -682,7 +645,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -693,7 +656,7 @@ public BlobsQueryHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -702,7 +665,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsQueryHeaders object itself. */ @@ -713,7 +676,7 @@ public BlobsQueryHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { /** * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @return the xMsCopyProgress value. */ public String getXMsCopyProgress() { @@ -722,7 +685,7 @@ public String getXMsCopyProgress() { /** * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * + * * @param xMsCopyProgress the xMsCopyProgress value to set. * @return the BlobsQueryHeaders object itself. */ @@ -733,7 +696,7 @@ public BlobsQueryHeaders setXMsCopyProgress(String xMsCopyProgress) { /** * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @return the xMsBlobCommittedBlockCount value. */ public Integer getXMsBlobCommittedBlockCount() { @@ -742,7 +705,7 @@ public Integer getXMsBlobCommittedBlockCount() { /** * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * + * * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. * @return the BlobsQueryHeaders object itself. */ @@ -753,7 +716,7 @@ public BlobsQueryHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedB /** * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @return the xMsBlobContentMd5 value. */ public byte[] getXMsBlobContentMd5() { @@ -762,7 +725,7 @@ public byte[] getXMsBlobContentMd5() { /** * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * + * * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -773,7 +736,7 @@ public BlobsQueryHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -782,7 +745,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the BlobsQueryHeaders object itself. */ @@ -793,7 +756,7 @@ public BlobsQueryHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -805,7 +768,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsQueryHeaders object itself. */ @@ -820,7 +783,7 @@ public BlobsQueryHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -829,7 +792,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlobsQueryHeaders object itself. */ @@ -840,7 +803,7 @@ public BlobsQueryHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @return the xMsCopyCompletionTime value. */ public OffsetDateTime getXMsCopyCompletionTime() { @@ -852,7 +815,7 @@ public OffsetDateTime getXMsCopyCompletionTime() { /** * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * + * * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. * @return the BlobsQueryHeaders object itself. */ @@ -867,7 +830,7 @@ public BlobsQueryHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompleti /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ public String getAcceptRanges() { @@ -876,7 +839,7 @@ public String getAcceptRanges() { /** * Set the acceptRanges property: The Accept-Ranges property. - * + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsQueryHeaders object itself. */ @@ -887,7 +850,7 @@ public BlobsQueryHeaders setAcceptRanges(String acceptRanges) { /** * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @return the xMsServerEncrypted value. */ public Boolean isXMsServerEncrypted() { @@ -896,7 +859,7 @@ public Boolean isXMsServerEncrypted() { /** * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * + * * @param xMsServerEncrypted the xMsServerEncrypted value to set. * @return the BlobsQueryHeaders object itself. */ @@ -907,7 +870,7 @@ public BlobsQueryHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -916,7 +879,7 @@ public String getCacheControl() { /** * Set the cacheControl property: The Cache-Control property. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobsQueryHeaders object itself. */ @@ -927,7 +890,7 @@ public BlobsQueryHeaders setCacheControl(String cacheControl) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -936,7 +899,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsQueryHeaders object itself. */ @@ -947,7 +910,7 @@ public BlobsQueryHeaders setETag(String eTag) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -956,7 +919,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: The Content-Disposition property. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsQueryHeaders object itself. */ @@ -967,7 +930,7 @@ public BlobsQueryHeaders setContentDisposition(String contentDisposition) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -976,7 +939,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsQueryHeaders object itself. */ @@ -987,7 +950,7 @@ public BlobsQueryHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -996,7 +959,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: The Content-Language property. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsQueryHeaders object itself. */ @@ -1007,7 +970,7 @@ public BlobsQueryHeaders setContentLanguage(String contentLanguage) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -1016,7 +979,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsQueryHeaders object itself. */ @@ -1027,7 +990,7 @@ public BlobsQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -1036,7 +999,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsQueryHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java index 0f6d33c7c4737..3e406bc913f3e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java @@ -8,58 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsReleaseLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsReleaseLeaseHeaders model. + */ @Fluent public final class BlobsReleaseLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsReleaseLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,7 +60,7 @@ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -79,7 +70,7 @@ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +79,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -99,7 +90,7 @@ public BlobsReleaseLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +99,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -119,7 +110,7 @@ public BlobsReleaseLeaseHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -131,7 +122,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -146,7 +137,7 @@ public BlobsReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -155,7 +146,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -166,7 +157,7 @@ public BlobsReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -175,7 +166,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ @@ -186,7 +177,7 @@ public BlobsReleaseLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -198,7 +189,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsReleaseLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java index 9df9cecc0f4a5..9c6ab394e58c0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsRenewLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsRenewLeaseHeaders model. + */ @Fluent public final class BlobsRenewLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-id property. */ - @JsonProperty(value = "x-ms-lease-id") private String xMsLeaseId; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsRenewLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { @@ -78,7 +68,7 @@ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -88,7 +78,7 @@ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -97,7 +87,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -108,7 +98,7 @@ public BlobsRenewLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -117,7 +107,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -128,7 +118,7 @@ public BlobsRenewLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -137,7 +127,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -148,7 +138,7 @@ public BlobsRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +150,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -175,7 +165,7 @@ public BlobsRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -184,7 +174,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -195,7 +185,7 @@ public BlobsRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -204,7 +194,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsRenewLeaseHeaders object itself. */ @@ -215,7 +205,7 @@ public BlobsRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -227,7 +217,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsRenewLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java index a880a7d0ea7a1..2a0b942225318 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java @@ -8,58 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsSetExpiryHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsSetExpiryHeaders model. + */ @Fluent public final class BlobsSetExpiryHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetExpiryHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { @@ -69,7 +60,7 @@ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -79,7 +70,7 @@ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +79,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -99,7 +90,7 @@ public BlobsSetExpiryHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +99,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -119,7 +110,7 @@ public BlobsSetExpiryHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -131,7 +122,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -146,7 +137,7 @@ public BlobsSetExpiryHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -155,7 +146,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -166,7 +157,7 @@ public BlobsSetExpiryHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -175,7 +166,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetExpiryHeaders object itself. */ @@ -186,7 +177,7 @@ public BlobsSetExpiryHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -198,7 +189,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetExpiryHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java index 531bf1ed04ca9..72c91deab0f19 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java @@ -8,67 +8,57 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsSetHttpHeadersHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsSetHttpHeadersHeaders model. + */ @Fluent public final class BlobsSetHttpHeadersHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetHttpHeadersHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { @@ -82,7 +72,7 @@ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -92,7 +82,7 @@ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -101,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -112,7 +102,7 @@ public BlobsSetHttpHeadersHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -121,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -132,7 +122,7 @@ public BlobsSetHttpHeadersHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -141,7 +131,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -152,7 +142,7 @@ public BlobsSetHttpHeadersHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceN /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -164,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -179,7 +169,7 @@ public BlobsSetHttpHeadersHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -188,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -199,7 +189,7 @@ public BlobsSetHttpHeadersHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -208,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ @@ -219,7 +209,7 @@ public BlobsSetHttpHeadersHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -231,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetHttpHeadersHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java index 1da37837c29a9..5e7e019ecc18d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java @@ -9,64 +9,55 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsSetImmutabilityPolicyHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsSetImmutabilityPolicyHeaders model. + */ @Fluent public final class BlobsSetImmutabilityPolicyHeaders { /* * The x-ms-immutability-policy-mode property. */ - @JsonProperty(value = "x-ms-immutability-policy-mode") private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-immutability-policy-until-date property. */ - @JsonProperty(value = "x-ms-immutability-policy-until-date") private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; - private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE = - HttpHeaderName.fromString("x-ms-immutability-policy-mode"); + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_MODE + = HttpHeaderName.fromString("x-ms-immutability-policy-mode"); private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE = - HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE + = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetImmutabilityPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { @@ -79,7 +70,7 @@ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { if (xMsImmutabilityPolicyUntilDate != null) { this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -89,7 +80,7 @@ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @return the xMsImmutabilityPolicyMode value. */ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { @@ -98,19 +89,19 @@ public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { /** * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * + * * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ - public BlobsSetImmutabilityPolicyHeaders setXMsImmutabilityPolicyMode( - BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { + public BlobsSetImmutabilityPolicyHeaders + setXMsImmutabilityPolicyMode(BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; return this; } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -119,7 +110,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -130,7 +121,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @return the xMsImmutabilityPolicyUntilDate value. */ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { @@ -142,12 +133,12 @@ public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { /** * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * + * * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ - public BlobsSetImmutabilityPolicyHeaders setXMsImmutabilityPolicyUntilDate( - OffsetDateTime xMsImmutabilityPolicyUntilDate) { + public BlobsSetImmutabilityPolicyHeaders + setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { if (xMsImmutabilityPolicyUntilDate == null) { this.xMsImmutabilityPolicyUntilDate = null; } else { @@ -158,7 +149,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsImmutabilityPolicyUntilDate( /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -167,7 +158,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -178,7 +169,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -187,7 +178,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ @@ -198,7 +189,7 @@ public BlobsSetImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClientR /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -210,7 +201,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetImmutabilityPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java index dc232ec5a6b31..da39f6609b9ba 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java @@ -8,59 +8,51 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsSetLegalHoldHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsSetLegalHoldHeaders model. + */ @Fluent public final class BlobsSetLegalHoldHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-legal-hold property. */ - @JsonProperty(value = "x-ms-legal-hold") private Boolean xMsLegalHold; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetLegalHoldHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); if (xMsLegalHold != null) { this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); @@ -74,7 +66,7 @@ public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -83,7 +75,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -94,7 +86,7 @@ public BlobsSetLegalHoldHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -103,7 +95,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -114,7 +106,7 @@ public BlobsSetLegalHoldHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @return the xMsLegalHold value. */ public Boolean isXMsLegalHold() { @@ -123,7 +115,7 @@ public Boolean isXMsLegalHold() { /** * Set the xMsLegalHold property: The x-ms-legal-hold property. - * + * * @param xMsLegalHold the xMsLegalHold value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -134,7 +126,7 @@ public BlobsSetLegalHoldHeaders setXMsLegalHold(Boolean xMsLegalHold) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -143,7 +135,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ @@ -154,7 +146,7 @@ public BlobsSetLegalHoldHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -166,7 +158,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetLegalHoldHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java index 9a0bf558de335..a0ebd14cd9d6a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java @@ -8,92 +8,79 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsSetMetadataHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsSetMetadataHeaders model. + */ @Fluent public final class BlobsSetMetadataHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetMetadataHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { @@ -105,7 +92,7 @@ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -120,7 +107,7 @@ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -129,7 +116,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -140,7 +127,7 @@ public BlobsSetMetadataHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -149,7 +136,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -160,7 +147,7 @@ public BlobsSetMetadataHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -172,7 +159,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -187,7 +174,7 @@ public BlobsSetMetadataHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -196,7 +183,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -207,7 +194,7 @@ public BlobsSetMetadataHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -216,7 +203,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -227,7 +214,7 @@ public BlobsSetMetadataHeaders setXMsEncryptionKeySha256(String xMsEncryptionKey /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -236,7 +223,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -247,7 +234,7 @@ public BlobsSetMetadataHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -256,7 +243,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -267,7 +254,7 @@ public BlobsSetMetadataHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -276,7 +263,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -287,7 +274,7 @@ public BlobsSetMetadataHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -299,7 +286,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetMetadataHeaders object itself. */ @@ -314,7 +301,7 @@ public BlobsSetMetadataHeaders setDate(OffsetDateTime date) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -323,7 +310,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlobsSetMetadataHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java index d3434e5f0328e..9bc6fe450dbac 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsSetTagsHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsSetTagsHeaders model. + */ @Fluent public final class BlobsSetTagsHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetTagsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -82,7 +75,7 @@ public BlobsSetTagsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -102,7 +95,7 @@ public BlobsSetTagsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetTagsHeaders object itself. */ @@ -122,7 +115,7 @@ public BlobsSetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsSetTagsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java index e05887ec357ee..a10d31c653b28 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java @@ -7,50 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** The BlobsSetTierHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsSetTierHeaders model. + */ @Fluent public final class BlobsSetTierHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetTierHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTierHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -59,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsSetTierHeaders object itself. */ @@ -70,7 +64,7 @@ public BlobsSetTierHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -79,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsSetTierHeaders object itself. */ @@ -90,7 +84,7 @@ public BlobsSetTierHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -99,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsSetTierHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLHeaders.java index 019fc013ecb91..8d0fc6cbf12ad 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLHeaders.java @@ -9,66 +9,56 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.models.CopyStatusType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsStartCopyFromURLHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsStartCopyFromURLHeaders model. + */ @Fluent public final class BlobsStartCopyFromURLHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-copy-id property. */ - @JsonProperty(value = "x-ms-copy-id") private String xMsCopyId; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-copy-status property. */ - @JsonProperty(value = "x-ms-copy-status") private CopyStatusType xMsCopyStatus; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -79,12 +69,10 @@ public final class BlobsStartCopyFromURLHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsStartCopyFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsStartCopyFromURLHeaders(HttpHeaders rawHeaders) { @@ -100,7 +88,7 @@ public BlobsStartCopyFromURLHeaders(HttpHeaders rawHeaders) { if (xMsCopyStatus != null) { this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -110,7 +98,7 @@ public BlobsStartCopyFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -119,7 +107,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -130,7 +118,7 @@ public BlobsStartCopyFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -139,7 +127,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -150,7 +138,7 @@ public BlobsStartCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -159,7 +147,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -170,7 +158,7 @@ public BlobsStartCopyFromURLHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -182,7 +170,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -197,7 +185,7 @@ public BlobsStartCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -206,7 +194,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -217,7 +205,7 @@ public BlobsStartCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -226,7 +214,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -237,7 +225,7 @@ public BlobsStartCopyFromURLHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatu /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -246,7 +234,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -257,7 +245,7 @@ public BlobsStartCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -266,7 +254,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ @@ -277,7 +265,7 @@ public BlobsStartCopyFromURLHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -289,7 +277,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsStartCopyFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java index 275682a655c2c..1f4447341af75 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlobsUndeleteHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlobsUndeleteHeaders model. + */ @Fluent public final class BlobsUndeleteHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsUndeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -82,7 +75,7 @@ public BlobsUndeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -102,7 +95,7 @@ public BlobsUndeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlobsUndeleteHeaders object itself. */ @@ -122,7 +115,7 @@ public BlobsUndeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlobsUndeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java index a7b3e7bea9edf..303156d603267 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java @@ -9,85 +9,72 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The BlockBlobsCommitBlockListHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlockBlobsCommitBlockListHeaders model. + */ @Fluent public final class BlockBlobsCommitBlockListHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -96,20 +83,18 @@ public final class BlockBlobsCommitBlockListHeaders { private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsCommitBlockListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { @@ -125,7 +110,7 @@ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -144,7 +129,7 @@ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -153,7 +138,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -164,7 +149,7 @@ public BlockBlobsCommitBlockListHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -173,7 +158,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -184,7 +169,7 @@ public BlockBlobsCommitBlockListHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -193,7 +178,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -204,7 +189,7 @@ public BlockBlobsCommitBlockListHeaders setXMsContentCrc64(byte[] xMsContentCrc6 /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -216,7 +201,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -231,7 +216,7 @@ public BlockBlobsCommitBlockListHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -240,7 +225,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -251,7 +236,7 @@ public BlockBlobsCommitBlockListHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -260,7 +245,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -271,7 +256,7 @@ public BlockBlobsCommitBlockListHeaders setXMsEncryptionKeySha256(String xMsEncr /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -280,7 +265,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -291,7 +276,7 @@ public BlockBlobsCommitBlockListHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -300,7 +285,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -311,7 +296,7 @@ public BlockBlobsCommitBlockListHeaders setXMsRequestServerEncrypted(Boolean xMs /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -320,7 +305,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -331,7 +316,7 @@ public BlockBlobsCommitBlockListHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -343,7 +328,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -358,7 +343,7 @@ public BlockBlobsCommitBlockListHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -367,7 +352,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ @@ -378,7 +363,7 @@ public BlockBlobsCommitBlockListHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -387,7 +372,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsCommitBlockListHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java index d29cc137de13a..30e91dd9fb7ed 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java @@ -8,73 +8,62 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The BlockBlobsGetBlockListHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlockBlobsGetBlockListHeaders model. + */ @Fluent public final class BlockBlobsGetBlockListHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-blob-content-length property. */ - @JsonProperty(value = "x-ms-blob-content-length") private Long xMsBlobContentLength; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = - HttpHeaderName.fromString("x-ms-blob-content-length"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH + = HttpHeaderName.fromString("x-ms-blob-content-length"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsGetBlockListHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { @@ -88,7 +77,7 @@ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -99,7 +88,7 @@ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -108,7 +97,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -119,7 +108,7 @@ public BlockBlobsGetBlockListHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -128,7 +117,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -139,7 +128,7 @@ public BlockBlobsGetBlockListHeaders setXMsBlobContentLength(Long xMsBlobContent /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -148,7 +137,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -159,7 +148,7 @@ public BlockBlobsGetBlockListHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -171,7 +160,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -186,7 +175,7 @@ public BlockBlobsGetBlockListHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -195,7 +184,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -206,7 +195,7 @@ public BlockBlobsGetBlockListHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -215,7 +204,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -226,7 +215,7 @@ public BlockBlobsGetBlockListHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -238,7 +227,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ @@ -253,7 +242,7 @@ public BlockBlobsGetBlockListHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -262,7 +251,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the BlockBlobsGetBlockListHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsPutBlobFromUrlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsPutBlobFromUrlHeaders.java index b885202d7192c..27b3764044582 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsPutBlobFromUrlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsPutBlobFromUrlHeaders.java @@ -9,99 +9,85 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The BlockBlobsPutBlobFromUrlHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlockBlobsPutBlobFromUrlHeaders model. + */ @Fluent public final class BlockBlobsPutBlobFromUrlHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsPutBlobFromUrlHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { @@ -113,7 +99,7 @@ public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -132,7 +118,7 @@ public BlockBlobsPutBlobFromUrlHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -141,7 +127,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -152,7 +138,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -161,7 +147,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -172,7 +158,7 @@ public BlockBlobsPutBlobFromUrlHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -184,7 +170,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -199,7 +185,7 @@ public BlockBlobsPutBlobFromUrlHeaders setLastModified(OffsetDateTime lastModifi /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -208,7 +194,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -219,7 +205,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -228,7 +214,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -239,7 +225,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsEncryptionKeySha256(String xMsEncry /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -248,7 +234,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -259,7 +245,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -268,7 +254,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -279,7 +265,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsRequestServerEncrypted(Boolean xMsR /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -288,7 +274,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -299,7 +285,7 @@ public BlockBlobsPutBlobFromUrlHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -311,7 +297,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -326,7 +312,7 @@ public BlockBlobsPutBlobFromUrlHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -335,7 +321,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ @@ -346,7 +332,7 @@ public BlockBlobsPutBlobFromUrlHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -355,7 +341,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsPutBlobFromUrlHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLHeaders.java index 6bfd0a1224725..1e2d2f524d05b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLHeaders.java @@ -9,87 +9,75 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The BlockBlobsStageBlockFromURLHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlockBlobsStageBlockFromURLHeaders model. + */ @Fluent public final class BlockBlobsStageBlockFromURLHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsStageBlockFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { @@ -99,7 +87,7 @@ public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -118,7 +106,7 @@ public BlockBlobsStageBlockFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -127,7 +115,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -138,7 +126,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -147,7 +135,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -158,7 +146,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsContentCrc64(byte[] xMsContentCr /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -167,7 +155,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -178,7 +166,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsEncryptionKeySha256(String xMsEn /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -187,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -198,7 +186,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -207,7 +195,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -218,7 +206,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsRequestServerEncrypted(Boolean x /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -227,7 +215,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -238,7 +226,7 @@ public BlockBlobsStageBlockFromURLHeaders setXMsClientRequestId(String xMsClient /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -250,7 +238,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -265,7 +253,7 @@ public BlockBlobsStageBlockFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -274,7 +262,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ @@ -285,7 +273,7 @@ public BlockBlobsStageBlockFromURLHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -294,7 +282,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsStageBlockFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java index 19694731bbf90..71887c54bf3c9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java @@ -9,87 +9,75 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The BlockBlobsStageBlockHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlockBlobsStageBlockHeaders model. + */ @Fluent public final class BlockBlobsStageBlockHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsStageBlockHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { @@ -99,7 +87,7 @@ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -118,7 +106,7 @@ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -127,7 +115,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -138,7 +126,7 @@ public BlockBlobsStageBlockHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -147,7 +135,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -158,7 +146,7 @@ public BlockBlobsStageBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -167,7 +155,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -178,7 +166,7 @@ public BlockBlobsStageBlockHeaders setXMsEncryptionKeySha256(String xMsEncryptio /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -187,7 +175,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -198,7 +186,7 @@ public BlockBlobsStageBlockHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -207,7 +195,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -218,7 +206,7 @@ public BlockBlobsStageBlockHeaders setXMsRequestServerEncrypted(Boolean xMsReque /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -227,7 +215,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -238,7 +226,7 @@ public BlockBlobsStageBlockHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -250,7 +238,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -265,7 +253,7 @@ public BlockBlobsStageBlockHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -274,7 +262,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ @@ -285,7 +273,7 @@ public BlockBlobsStageBlockHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -294,7 +282,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsStageBlockHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java index 7de1da22d1a0b..ed89e2d09b9a8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java @@ -9,99 +9,85 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The BlockBlobsUploadHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The BlockBlobsUploadHeaders model. + */ @Fluent public final class BlockBlobsUploadHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsUploadHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { @@ -113,7 +99,7 @@ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -132,7 +118,7 @@ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -141,7 +127,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -152,7 +138,7 @@ public BlockBlobsUploadHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -161,7 +147,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -172,7 +158,7 @@ public BlockBlobsUploadHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -184,7 +170,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -199,7 +185,7 @@ public BlockBlobsUploadHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -208,7 +194,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -219,7 +205,7 @@ public BlockBlobsUploadHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -228,7 +214,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -239,7 +225,7 @@ public BlockBlobsUploadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKey /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -248,7 +234,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -259,7 +245,7 @@ public BlockBlobsUploadHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -268,7 +254,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -279,7 +265,7 @@ public BlockBlobsUploadHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -288,7 +274,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -299,7 +285,7 @@ public BlockBlobsUploadHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -311,7 +297,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -326,7 +312,7 @@ public BlockBlobsUploadHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -335,7 +321,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the BlockBlobsUploadHeaders object itself. */ @@ -346,7 +332,7 @@ public BlockBlobsUploadHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -355,7 +341,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the BlockBlobsUploadHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java index 3c5699b0f4a2c..d5d9d55126aff 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersAcquireLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersAcquireLeaseHeaders model. + */ @Fluent public final class ContainersAcquireLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-id property. */ - @JsonProperty(value = "x-ms-lease-id") private String xMsLeaseId; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersAcquireLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { @@ -78,7 +68,7 @@ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -88,7 +78,7 @@ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -97,7 +87,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -108,7 +98,7 @@ public ContainersAcquireLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -117,7 +107,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -128,7 +118,7 @@ public ContainersAcquireLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -137,7 +127,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -148,7 +138,7 @@ public ContainersAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +150,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -175,7 +165,7 @@ public ContainersAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -184,7 +174,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -195,7 +185,7 @@ public ContainersAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -204,7 +194,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ @@ -215,7 +205,7 @@ public ContainersAcquireLeaseHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -227,7 +217,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersAcquireLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java index 6cfb2c5902a01..e98ae25057fbe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersBreakLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersBreakLeaseHeaders model. + */ @Fluent public final class ContainersBreakLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-time property. */ - @JsonProperty(value = "x-ms-lease-time") private Integer xMsLeaseTime; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersBreakLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { @@ -81,7 +71,7 @@ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -91,7 +81,7 @@ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -100,7 +90,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -111,7 +101,7 @@ public ContainersBreakLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -120,7 +110,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -131,7 +121,7 @@ public ContainersBreakLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @return the xMsLeaseTime value. */ public Integer getXMsLeaseTime() { @@ -140,7 +130,7 @@ public Integer getXMsLeaseTime() { /** * Set the xMsLeaseTime property: The x-ms-lease-time property. - * + * * @param xMsLeaseTime the xMsLeaseTime value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -151,7 +141,7 @@ public ContainersBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -163,7 +153,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -178,7 +168,7 @@ public ContainersBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -187,7 +177,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -198,7 +188,7 @@ public ContainersBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -207,7 +197,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersBreakLeaseHeaders object itself. */ @@ -218,7 +208,7 @@ public ContainersBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -230,7 +220,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersBreakLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java index dc2f541e262dc..587179e913d93 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersChangeLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersChangeLeaseHeaders model. + */ @Fluent public final class ContainersChangeLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-id property. */ - @JsonProperty(value = "x-ms-lease-id") private String xMsLeaseId; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersChangeLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { @@ -78,7 +68,7 @@ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -88,7 +78,7 @@ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -97,7 +87,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -108,7 +98,7 @@ public ContainersChangeLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -117,7 +107,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -128,7 +118,7 @@ public ContainersChangeLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -137,7 +127,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -148,7 +138,7 @@ public ContainersChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +150,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -175,7 +165,7 @@ public ContainersChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -184,7 +174,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -195,7 +185,7 @@ public ContainersChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -204,7 +194,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersChangeLeaseHeaders object itself. */ @@ -215,7 +205,7 @@ public ContainersChangeLeaseHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -227,7 +217,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersChangeLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java index 0dd7297274349..b68c7814c67ba 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java @@ -8,58 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersCreateHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersCreateHeaders model. + */ @Fluent public final class ContainersCreateHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersCreateHeaders(HttpHeaders rawHeaders) { @@ -69,7 +60,7 @@ public ContainersCreateHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -79,7 +70,7 @@ public ContainersCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +79,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersCreateHeaders object itself. */ @@ -99,7 +90,7 @@ public ContainersCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +99,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersCreateHeaders object itself. */ @@ -119,7 +110,7 @@ public ContainersCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -131,7 +122,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersCreateHeaders object itself. */ @@ -146,7 +137,7 @@ public ContainersCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -155,7 +146,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersCreateHeaders object itself. */ @@ -166,7 +157,7 @@ public ContainersCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -175,7 +166,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersCreateHeaders object itself. */ @@ -186,7 +177,7 @@ public ContainersCreateHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -198,7 +189,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java index 386adb2c28f95..1764c6373bc06 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersDeleteHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersDeleteHeaders model. + */ @Fluent public final class ContainersDeleteHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersDeleteHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public ContainersDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -82,7 +75,7 @@ public ContainersDeleteHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -102,7 +95,7 @@ public ContainersDeleteHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersDeleteHeaders object itself. */ @@ -122,7 +115,7 @@ public ContainersDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersDeleteHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java index 2077bcd9f464b..c38a4de459db7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersFilterBlobsHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersFilterBlobsHeaders model. + */ @Fluent public final class ContainersFilterBlobsHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersFilterBlobsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -82,7 +75,7 @@ public ContainersFilterBlobsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -102,7 +95,7 @@ public ContainersFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersFilterBlobsHeaders object itself. */ @@ -122,7 +115,7 @@ public ContainersFilterBlobsHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersFilterBlobsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java index d069e40287d27..46ac1b4d27b96 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java @@ -9,66 +9,56 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.models.PublicAccessType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersGetAccessPolicyHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersGetAccessPolicyHeaders model. + */ @Fluent public final class ContainersGetAccessPolicyHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-blob-public-access property. */ - @JsonProperty(value = "x-ms-blob-public-access") private PublicAccessType xMsBlobPublicAccess; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetAccessPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { @@ -82,7 +72,7 @@ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { if (xMsBlobPublicAccess != null) { this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -92,7 +82,7 @@ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -101,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -112,7 +102,7 @@ public ContainersGetAccessPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -121,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -132,7 +122,7 @@ public ContainersGetAccessPolicyHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -144,7 +134,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -159,7 +149,7 @@ public ContainersGetAccessPolicyHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @return the xMsBlobPublicAccess value. */ public PublicAccessType getXMsBlobPublicAccess() { @@ -168,7 +158,7 @@ public PublicAccessType getXMsBlobPublicAccess() { /** * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -179,7 +169,7 @@ public ContainersGetAccessPolicyHeaders setXMsBlobPublicAccess(PublicAccessType /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -188,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -199,7 +189,7 @@ public ContainersGetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -208,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ @@ -219,7 +209,7 @@ public ContainersGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -231,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetAccessPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java index 81e8f3c0cdbb0..275e5003b25df 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java @@ -10,70 +10,53 @@ import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.models.AccountKind; import com.azure.storage.blob.models.SkuName; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersGetAccountInfoHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersGetAccountInfoHeaders model. + */ @Fluent public final class ContainersGetAccountInfoHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-account-kind property. */ - @JsonProperty(value = "x-ms-account-kind") private AccountKind xMsAccountKind; - /* - * The x-ms-is-hns-enabled property. - */ - @JsonProperty(value = "x-ms-is-hns-enabled") - private Boolean xMsIsHnsEnabled; - /* * The x-ms-sku-name property. */ - @JsonProperty(value = "x-ms-sku-name") private SkuName xMsSkuName; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_ACCOUNT_KIND = HttpHeaderName.fromString("x-ms-account-kind"); - private static final HttpHeaderName X_MS_IS_HNS_ENABLED = HttpHeaderName.fromString("x-ms-is-hns-enabled"); - private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -82,15 +65,11 @@ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { if (xMsAccountKind != null) { this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); } - String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); - if (xMsIsHnsEnabled != null) { - this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); - } String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); if (xMsSkuName != null) { this.xMsSkuName = SkuName.fromString(xMsSkuName); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -100,7 +79,7 @@ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -109,7 +88,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -120,7 +99,7 @@ public ContainersGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -129,7 +108,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -138,29 +117,9 @@ public ContainersGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountK return this; } - /** - * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * - * @return the xMsIsHnsEnabled value. - */ - public Boolean isXMsIsHnsEnabled() { - return this.xMsIsHnsEnabled; - } - - /** - * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * - * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. - * @return the ContainersGetAccountInfoHeaders object itself. - */ - public ContainersGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { - this.xMsIsHnsEnabled = xMsIsHnsEnabled; - return this; - } - /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -169,7 +128,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -180,7 +139,7 @@ public ContainersGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -189,7 +148,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -200,7 +159,7 @@ public ContainersGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -209,7 +168,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ @@ -220,7 +179,7 @@ public ContainersGetAccountInfoHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -232,7 +191,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java index d3c90934ea77a..58d2d7bbb6236 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java @@ -5,7 +5,6 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.HeaderCollection; import com.azure.core.http.HttpHeader; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; @@ -14,142 +13,123 @@ import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; import com.azure.storage.blob.models.PublicAccessType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; -/** The ContainersGetPropertiesHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersGetPropertiesHeaders model. + */ @Fluent public final class ContainersGetPropertiesHeaders { /* * The x-ms-lease-status property. */ - @JsonProperty(value = "x-ms-lease-status") private LeaseStatusType xMsLeaseStatus; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-immutable-storage-with-versioning-enabled property. */ - @JsonProperty(value = "x-ms-immutable-storage-with-versioning-enabled") private Boolean xMsImmutableStorageWithVersioningEnabled; /* * The x-ms-lease-state property. */ - @JsonProperty(value = "x-ms-lease-state") private LeaseStateType xMsLeaseState; /* * The x-ms-deny-encryption-scope-override property. */ - @JsonProperty(value = "x-ms-deny-encryption-scope-override") private Boolean xMsDenyEncryptionScopeOverride; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-meta- property. */ - @HeaderCollection("x-ms-meta-") private Map xMsMeta; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The x-ms-has-legal-hold property. */ - @JsonProperty(value = "x-ms-has-legal-hold") private Boolean xMsHasLegalHold; /* * The x-ms-default-encryption-scope property. */ - @JsonProperty(value = "x-ms-default-encryption-scope") private String xMsDefaultEncryptionScope; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-has-immutability-policy property. */ - @JsonProperty(value = "x-ms-has-immutability-policy") private Boolean xMsHasImmutabilityPolicy; /* * The x-ms-lease-duration property. */ - @JsonProperty(value = "x-ms-lease-duration") private LeaseDurationType xMsLeaseDuration; /* * The x-ms-blob-public-access property. */ - @JsonProperty(value = "x-ms-blob-public-access") private PublicAccessType xMsBlobPublicAccess; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; private static final HttpHeaderName X_MS_LEASE_STATUS = HttpHeaderName.fromString("x-ms-lease-status"); private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED = - HttpHeaderName.fromString("x-ms-immutable-storage-with-versioning-enabled"); + private static final HttpHeaderName X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED + = HttpHeaderName.fromString("x-ms-immutable-storage-with-versioning-enabled"); private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); - private static final HttpHeaderName X_MS_DENY_ENCRYPTION_SCOPE_OVERRIDE = - HttpHeaderName.fromString("x-ms-deny-encryption-scope-override"); + private static final HttpHeaderName X_MS_DENY_ENCRYPTION_SCOPE_OVERRIDE + = HttpHeaderName.fromString("x-ms-deny-encryption-scope-override"); private static final HttpHeaderName X_MS_HAS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-has-legal-hold"); - private static final HttpHeaderName X_MS_DEFAULT_ENCRYPTION_SCOPE = - HttpHeaderName.fromString("x-ms-default-encryption-scope"); + private static final HttpHeaderName X_MS_DEFAULT_ENCRYPTION_SCOPE + = HttpHeaderName.fromString("x-ms-default-encryption-scope"); - private static final HttpHeaderName X_MS_HAS_IMMUTABILITY_POLICY = - HttpHeaderName.fromString("x-ms-has-immutability-policy"); + private static final HttpHeaderName X_MS_HAS_IMMUTABILITY_POLICY + = HttpHeaderName.fromString("x-ms-has-immutability-policy"); private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); private static final HttpHeaderName X_MS_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { @@ -158,11 +138,11 @@ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); } this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String xMsImmutableStorageWithVersioningEnabled = - rawHeaders.getValue(X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED); + String xMsImmutableStorageWithVersioningEnabled + = rawHeaders.getValue(X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED); if (xMsImmutableStorageWithVersioningEnabled != null) { - this.xMsImmutableStorageWithVersioningEnabled = - Boolean.parseBoolean(xMsImmutableStorageWithVersioningEnabled); + this.xMsImmutableStorageWithVersioningEnabled + = Boolean.parseBoolean(xMsImmutableStorageWithVersioningEnabled); } String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); if (xMsLeaseState != null) { @@ -198,7 +178,7 @@ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { if (xMsBlobPublicAccess != null) { this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); Map xMsMetaHeaderCollection = new HashMap<>(); @@ -214,7 +194,7 @@ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @return the xMsLeaseStatus value. */ public LeaseStatusType getXMsLeaseStatus() { @@ -223,7 +203,7 @@ public LeaseStatusType getXMsLeaseStatus() { /** * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * + * * @param xMsLeaseStatus the xMsLeaseStatus value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -234,7 +214,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLease /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -243,7 +223,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -255,7 +235,7 @@ public ContainersGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled * property. - * + * * @return the xMsImmutableStorageWithVersioningEnabled value. */ public Boolean isXMsImmutableStorageWithVersioningEnabled() { @@ -265,19 +245,19 @@ public Boolean isXMsImmutableStorageWithVersioningEnabled() { /** * Set the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled * property. - * + * * @param xMsImmutableStorageWithVersioningEnabled the xMsImmutableStorageWithVersioningEnabled value to set. * @return the ContainersGetPropertiesHeaders object itself. */ - public ContainersGetPropertiesHeaders setXMsImmutableStorageWithVersioningEnabled( - Boolean xMsImmutableStorageWithVersioningEnabled) { + public ContainersGetPropertiesHeaders + setXMsImmutableStorageWithVersioningEnabled(Boolean xMsImmutableStorageWithVersioningEnabled) { this.xMsImmutableStorageWithVersioningEnabled = xMsImmutableStorageWithVersioningEnabled; return this; } /** * Get the xMsLeaseState property: The x-ms-lease-state property. - * + * * @return the xMsLeaseState value. */ public LeaseStateType getXMsLeaseState() { @@ -286,7 +266,7 @@ public LeaseStateType getXMsLeaseState() { /** * Set the xMsLeaseState property: The x-ms-lease-state property. - * + * * @param xMsLeaseState the xMsLeaseState value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -297,7 +277,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseSt /** * Get the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * + * * @return the xMsDenyEncryptionScopeOverride value. */ public Boolean isXMsDenyEncryptionScopeOverride() { @@ -306,7 +286,7 @@ public Boolean isXMsDenyEncryptionScopeOverride() { /** * Set the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * + * * @param xMsDenyEncryptionScopeOverride the xMsDenyEncryptionScopeOverride value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -317,7 +297,7 @@ public ContainersGetPropertiesHeaders setXMsDenyEncryptionScopeOverride(Boolean /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -329,7 +309,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -344,7 +324,7 @@ public ContainersGetPropertiesHeaders setLastModified(OffsetDateTime lastModifie /** * Get the xMsMeta property: The x-ms-meta- property. - * + * * @return the xMsMeta value. */ public Map getXMsMeta() { @@ -353,7 +333,7 @@ public Map getXMsMeta() { /** * Set the xMsMeta property: The x-ms-meta- property. - * + * * @param xMsMeta the xMsMeta value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -364,7 +344,7 @@ public ContainersGetPropertiesHeaders setXMsMeta(Map xMsMeta) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -376,7 +356,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -391,7 +371,7 @@ public ContainersGetPropertiesHeaders setDate(OffsetDateTime date) { /** * Get the xMsHasLegalHold property: The x-ms-has-legal-hold property. - * + * * @return the xMsHasLegalHold value. */ public Boolean isXMsHasLegalHold() { @@ -400,7 +380,7 @@ public Boolean isXMsHasLegalHold() { /** * Set the xMsHasLegalHold property: The x-ms-has-legal-hold property. - * + * * @param xMsHasLegalHold the xMsHasLegalHold value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -411,7 +391,7 @@ public ContainersGetPropertiesHeaders setXMsHasLegalHold(Boolean xMsHasLegalHold /** * Get the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. - * + * * @return the xMsDefaultEncryptionScope value. */ public String getXMsDefaultEncryptionScope() { @@ -420,7 +400,7 @@ public String getXMsDefaultEncryptionScope() { /** * Set the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. - * + * * @param xMsDefaultEncryptionScope the xMsDefaultEncryptionScope value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -431,7 +411,7 @@ public ContainersGetPropertiesHeaders setXMsDefaultEncryptionScope(String xMsDef /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -440,7 +420,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -451,7 +431,7 @@ public ContainersGetPropertiesHeaders setETag(String eTag) { /** * Get the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * + * * @return the xMsHasImmutabilityPolicy value. */ public Boolean isXMsHasImmutabilityPolicy() { @@ -460,7 +440,7 @@ public Boolean isXMsHasImmutabilityPolicy() { /** * Set the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * + * * @param xMsHasImmutabilityPolicy the xMsHasImmutabilityPolicy value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -471,7 +451,7 @@ public ContainersGetPropertiesHeaders setXMsHasImmutabilityPolicy(Boolean xMsHas /** * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @return the xMsLeaseDuration value. */ public LeaseDurationType getXMsLeaseDuration() { @@ -480,7 +460,7 @@ public LeaseDurationType getXMsLeaseDuration() { /** * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * + * * @param xMsLeaseDuration the xMsLeaseDuration value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -491,7 +471,7 @@ public ContainersGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsL /** * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @return the xMsBlobPublicAccess value. */ public PublicAccessType getXMsBlobPublicAccess() { @@ -500,7 +480,7 @@ public PublicAccessType getXMsBlobPublicAccess() { /** * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * + * * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -511,7 +491,7 @@ public ContainersGetPropertiesHeaders setXMsBlobPublicAccess(PublicAccessType xM /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -520,7 +500,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersGetPropertiesHeaders object itself. */ @@ -531,7 +511,7 @@ public ContainersGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -540,7 +520,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java index 7b5195c8d6b31..d1e6b59f8f667 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java @@ -8,57 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersListBlobFlatSegmentHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersListBlobFlatSegmentHeaders model. + */ @Fluent public final class ContainersListBlobFlatSegmentHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersListBlobFlatSegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -69,7 +61,7 @@ public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -78,7 +70,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -89,7 +81,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -98,7 +90,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -109,7 +101,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -118,7 +110,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -129,7 +121,7 @@ public ContainersListBlobFlatSegmentHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -141,7 +133,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ @@ -156,7 +148,7 @@ public ContainersListBlobFlatSegmentHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -165,7 +157,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersListBlobFlatSegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java index cb9127b21a73a..06605076db9e9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java @@ -8,57 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersListBlobHierarchySegmentHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersListBlobHierarchySegmentHeaders model. + */ @Fluent public final class ContainersListBlobHierarchySegmentHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersListBlobHierarchySegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -69,7 +61,7 @@ public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -78,7 +70,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -89,7 +81,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsVersion(String xMsVersion /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -98,7 +90,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -109,7 +101,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsRequestId(String xMsReque /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -118,7 +110,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -129,7 +121,7 @@ public ContainersListBlobHierarchySegmentHeaders setXMsClientRequestId(String xM /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -141,7 +133,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ @@ -156,7 +148,7 @@ public ContainersListBlobHierarchySegmentHeaders setDate(OffsetDateTime date) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -165,7 +157,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersListBlobHierarchySegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java index 529b1e99b9038..6b963eb88cf84 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java @@ -8,58 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersReleaseLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersReleaseLeaseHeaders model. + */ @Fluent public final class ContainersReleaseLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersReleaseLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { @@ -69,7 +60,7 @@ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -79,7 +70,7 @@ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +79,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -99,7 +90,7 @@ public ContainersReleaseLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +99,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -119,7 +110,7 @@ public ContainersReleaseLeaseHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -131,7 +122,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -146,7 +137,7 @@ public ContainersReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -155,7 +146,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -166,7 +157,7 @@ public ContainersReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -175,7 +166,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ @@ -186,7 +177,7 @@ public ContainersReleaseLeaseHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -198,7 +189,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersReleaseLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java index 77e8e43ee654e..137db8a3e2976 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersRenameHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersRenameHeaders model. + */ @Fluent public final class ContainersRenameHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRenameHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenameHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public ContainersRenameHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRenameHeaders object itself. */ @@ -82,7 +75,7 @@ public ContainersRenameHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRenameHeaders object itself. */ @@ -102,7 +95,7 @@ public ContainersRenameHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRenameHeaders object itself. */ @@ -122,7 +115,7 @@ public ContainersRenameHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRenameHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java index c61b013644f49..ffc55396253c5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java @@ -8,66 +8,56 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersRenewLeaseHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersRenewLeaseHeaders model. + */ @Fluent public final class ContainersRenewLeaseHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-lease-id property. */ - @JsonProperty(value = "x-ms-lease-id") private String xMsLeaseId; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRenewLeaseHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { @@ -78,7 +68,7 @@ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -88,7 +78,7 @@ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -97,7 +87,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -108,7 +98,7 @@ public ContainersRenewLeaseHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -117,7 +107,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -128,7 +118,7 @@ public ContainersRenewLeaseHeaders setETag(String eTag) { /** * Get the xMsLeaseId property: The x-ms-lease-id property. - * + * * @return the xMsLeaseId value. */ public String getXMsLeaseId() { @@ -137,7 +127,7 @@ public String getXMsLeaseId() { /** * Set the xMsLeaseId property: The x-ms-lease-id property. - * + * * @param xMsLeaseId the xMsLeaseId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -148,7 +138,7 @@ public ContainersRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -160,7 +150,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -175,7 +165,7 @@ public ContainersRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -184,7 +174,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -195,7 +185,7 @@ public ContainersRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -204,7 +194,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRenewLeaseHeaders object itself. */ @@ -215,7 +205,7 @@ public ContainersRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -227,7 +217,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRenewLeaseHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java index f80d3915e6e1c..50e6ef0d04f45 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersRestoreHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersRestoreHeaders model. + */ @Fluent public final class ContainersRestoreHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersRestoreHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRestoreHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public ContainersRestoreHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -82,7 +75,7 @@ public ContainersRestoreHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -102,7 +95,7 @@ public ContainersRestoreHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersRestoreHeaders object itself. */ @@ -122,7 +115,7 @@ public ContainersRestoreHeaders setXMsClientRequestId(String xMsClientRequestId) /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersRestoreHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java index 9799a20c41442..b115bd124df11 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java @@ -8,58 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersSetAccessPolicyHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersSetAccessPolicyHeaders model. + */ @Fluent public final class ContainersSetAccessPolicyHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSetAccessPolicyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { @@ -69,7 +60,7 @@ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -79,7 +70,7 @@ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +79,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -99,7 +90,7 @@ public ContainersSetAccessPolicyHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +99,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -119,7 +110,7 @@ public ContainersSetAccessPolicyHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -131,7 +122,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -146,7 +137,7 @@ public ContainersSetAccessPolicyHeaders setLastModified(OffsetDateTime lastModif /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -155,7 +146,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -166,7 +157,7 @@ public ContainersSetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -175,7 +166,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ @@ -186,7 +177,7 @@ public ContainersSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRe /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -198,7 +189,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersSetAccessPolicyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java index 36f72fc11c811..e421ff2be59b7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java @@ -8,58 +8,49 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ContainersSetMetadataHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersSetMetadataHeaders model. + */ @Fluent public final class ContainersSetMetadataHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSetMetadataHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { @@ -69,7 +60,7 @@ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -79,7 +70,7 @@ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -88,7 +79,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -99,7 +90,7 @@ public ContainersSetMetadataHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -108,7 +99,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -119,7 +110,7 @@ public ContainersSetMetadataHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -131,7 +122,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -146,7 +137,7 @@ public ContainersSetMetadataHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -155,7 +146,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -166,7 +157,7 @@ public ContainersSetMetadataHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -175,7 +166,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ContainersSetMetadataHeaders object itself. */ @@ -186,7 +177,7 @@ public ContainersSetMetadataHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -198,7 +189,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ContainersSetMetadataHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSubmitBatchHeaders.java index f556e9e0a315d..94d4f3c7ff0cb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSubmitBatchHeaders.java @@ -7,50 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** The ContainersSubmitBatchHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ContainersSubmitBatchHeaders model. + */ @Fluent public final class ContainersSubmitBatchHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersSubmitBatchHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersSubmitBatchHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -59,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ContainersSubmitBatchHeaders object itself. */ @@ -70,7 +64,7 @@ public ContainersSubmitBatchHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -79,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ContainersSubmitBatchHeaders object itself. */ @@ -90,7 +84,7 @@ public ContainersSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -99,7 +93,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ContainersSubmitBatchHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java index 6c371a6546e44..c7cccd42c60e3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java @@ -5,49 +5,53 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** Groups the settings used for interpreting the blob data if the blob is delimited text formatted. */ -@JacksonXmlRootElement(localName = "DelimitedTextConfiguration") +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Groups the settings used for interpreting the blob data if the blob is delimited text formatted. + */ @Fluent -public final class DelimitedTextConfiguration { +public final class DelimitedTextConfiguration implements XmlSerializable { /* * The string used to separate columns. */ - @JsonProperty(value = "ColumnSeparator") private String columnSeparator; /* * The string used to quote a specific field. */ - @JsonProperty(value = "FieldQuote") private String fieldQuote; /* * The string used to separate records. */ - @JsonProperty(value = "RecordSeparator") private String recordSeparator; /* * The string used as an escape character. */ - @JsonProperty(value = "EscapeChar") private String escapeChar; /* * Represents whether the data has headers. */ - @JsonProperty(value = "HasHeaders") private Boolean headersPresent; - /** Creates an instance of DelimitedTextConfiguration class. */ - public DelimitedTextConfiguration() {} + /** + * Creates an instance of DelimitedTextConfiguration class. + */ + public DelimitedTextConfiguration() { + } /** * Get the columnSeparator property: The string used to separate columns. - * + * * @return the columnSeparator value. */ public String getColumnSeparator() { @@ -56,7 +60,7 @@ public String getColumnSeparator() { /** * Set the columnSeparator property: The string used to separate columns. - * + * * @param columnSeparator the columnSeparator value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -67,7 +71,7 @@ public DelimitedTextConfiguration setColumnSeparator(String columnSeparator) { /** * Get the fieldQuote property: The string used to quote a specific field. - * + * * @return the fieldQuote value. */ public String getFieldQuote() { @@ -76,7 +80,7 @@ public String getFieldQuote() { /** * Set the fieldQuote property: The string used to quote a specific field. - * + * * @param fieldQuote the fieldQuote value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -87,7 +91,7 @@ public DelimitedTextConfiguration setFieldQuote(String fieldQuote) { /** * Get the recordSeparator property: The string used to separate records. - * + * * @return the recordSeparator value. */ public String getRecordSeparator() { @@ -96,7 +100,7 @@ public String getRecordSeparator() { /** * Set the recordSeparator property: The string used to separate records. - * + * * @param recordSeparator the recordSeparator value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -107,7 +111,7 @@ public DelimitedTextConfiguration setRecordSeparator(String recordSeparator) { /** * Get the escapeChar property: The string used as an escape character. - * + * * @return the escapeChar value. */ public String getEscapeChar() { @@ -116,7 +120,7 @@ public String getEscapeChar() { /** * Set the escapeChar property: The string used as an escape character. - * + * * @param escapeChar the escapeChar value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -127,7 +131,7 @@ public DelimitedTextConfiguration setEscapeChar(String escapeChar) { /** * Get the headersPresent property: Represents whether the data has headers. - * + * * @return the headersPresent value. */ public Boolean isHeadersPresent() { @@ -136,7 +140,7 @@ public Boolean isHeadersPresent() { /** * Set the headersPresent property: Represents whether the data has headers. - * + * * @param headersPresent the headersPresent value to set. * @return the DelimitedTextConfiguration object itself. */ @@ -144,4 +148,72 @@ public DelimitedTextConfiguration setHeadersPresent(Boolean headersPresent) { this.headersPresent = headersPresent; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "DelimitedTextConfiguration" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("ColumnSeparator", this.columnSeparator); + xmlWriter.writeStringElement("FieldQuote", this.fieldQuote); + xmlWriter.writeStringElement("RecordSeparator", this.recordSeparator); + xmlWriter.writeStringElement("EscapeChar", this.escapeChar); + xmlWriter.writeBooleanElement("HasHeaders", this.headersPresent); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of DelimitedTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of DelimitedTextConfiguration if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the DelimitedTextConfiguration. + */ + public static DelimitedTextConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of DelimitedTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of DelimitedTextConfiguration if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the DelimitedTextConfiguration. + */ + public static DelimitedTextConfiguration fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "DelimitedTextConfiguration" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + DelimitedTextConfiguration deserializedDelimitedTextConfiguration = new DelimitedTextConfiguration(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("ColumnSeparator".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.columnSeparator = reader.getStringElement(); + } else if ("FieldQuote".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.fieldQuote = reader.getStringElement(); + } else if ("RecordSeparator".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.recordSeparator = reader.getStringElement(); + } else if ("EscapeChar".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.escapeChar = reader.getStringElement(); + } else if ("HasHeaders".equals(elementName.getLocalPart())) { + deserializedDelimitedTextConfiguration.headersPresent + = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedDelimitedTextConfiguration; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/EncryptionScope.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/EncryptionScope.java index 69b98403e7323..a3c9577b772d7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/EncryptionScope.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/EncryptionScope.java @@ -5,29 +5,28 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** Parameter group. */ -@JacksonXmlRootElement(localName = "EncryptionScope") +/** + * Parameter group. + */ @Fluent public final class EncryptionScope { /* - * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data - * provided in the request. If not specified, encryption is performed with the default account encryption scope. - * For more information, see Encryption at Rest for Azure Storage Services. + * Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. */ - @JsonProperty(value = "encryptionScope") private String encryptionScope; - /** Creates an instance of EncryptionScope class. */ - public EncryptionScope() {} + /** + * Creates an instance of EncryptionScope class. + */ + public EncryptionScope() { + } /** * Get the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. - * + * * @return the encryptionScope value. */ public String getEncryptionScope() { @@ -38,7 +37,7 @@ public String getEncryptionScope() { * Set the encryptionScope property: Optional. Version 2019-07-07 and later. Specifies the name of the encryption * scope to use to encrypt the data provided in the request. If not specified, encryption is performed with the * default account encryption scope. For more information, see Encryption at Rest for Azure Storage Services. - * + * * @param encryptionScope the encryptionScope value to set. * @return the EncryptionScope object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java index 5263f9337e1cd..b96e12da2ab2f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java @@ -5,49 +5,53 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** Blob info from a Filter Blobs API call. */ -@JacksonXmlRootElement(localName = "Blob") +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Blob info from a Filter Blobs API call. + */ @Fluent -public final class FilterBlobItem { +public final class FilterBlobItem implements XmlSerializable { /* * The Name property. */ - @JsonProperty(value = "Name", required = true) private String name; /* * The ContainerName property. */ - @JsonProperty(value = "ContainerName", required = true) private String containerName; /* * Blob tags */ - @JsonProperty(value = "Tags") private BlobTags tags; /* * The VersionId property. */ - @JsonProperty(value = "VersionId") private String versionId; /* * The IsCurrentVersion property. */ - @JsonProperty(value = "IsCurrentVersion") private Boolean isCurrentVersion; - /** Creates an instance of FilterBlobItem class. */ - public FilterBlobItem() {} + /** + * Creates an instance of FilterBlobItem class. + */ + public FilterBlobItem() { + } /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -56,7 +60,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the FilterBlobItem object itself. */ @@ -67,7 +71,7 @@ public FilterBlobItem setName(String name) { /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -76,7 +80,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the FilterBlobItem object itself. */ @@ -87,7 +91,7 @@ public FilterBlobItem setContainerName(String containerName) { /** * Get the tags property: Blob tags. - * + * * @return the tags value. */ public BlobTags getTags() { @@ -96,7 +100,7 @@ public BlobTags getTags() { /** * Set the tags property: Blob tags. - * + * * @param tags the tags value to set. * @return the FilterBlobItem object itself. */ @@ -107,7 +111,7 @@ public FilterBlobItem setTags(BlobTags tags) { /** * Get the versionId property: The VersionId property. - * + * * @return the versionId value. */ public String getVersionId() { @@ -116,7 +120,7 @@ public String getVersionId() { /** * Set the versionId property: The VersionId property. - * + * * @param versionId the versionId value to set. * @return the FilterBlobItem object itself. */ @@ -127,7 +131,7 @@ public FilterBlobItem setVersionId(String versionId) { /** * Get the isCurrentVersion property: The IsCurrentVersion property. - * + * * @return the isCurrentVersion value. */ public Boolean isCurrentVersion() { @@ -136,7 +140,7 @@ public Boolean isCurrentVersion() { /** * Set the isCurrentVersion property: The IsCurrentVersion property. - * + * * @param isCurrentVersion the isCurrentVersion value to set. * @return the FilterBlobItem object itself. */ @@ -144,4 +148,71 @@ public FilterBlobItem setIsCurrentVersion(Boolean isCurrentVersion) { this.isCurrentVersion = isCurrentVersion; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeStringElement("ContainerName", this.containerName); + xmlWriter.writeXml(this.tags, "Tags"); + xmlWriter.writeStringElement("VersionId", this.versionId); + xmlWriter.writeBooleanElement("IsCurrentVersion", this.isCurrentVersion); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of FilterBlobItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of FilterBlobItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the FilterBlobItem. + */ + public static FilterBlobItem fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of FilterBlobItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of FilterBlobItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the FilterBlobItem. + */ + public static FilterBlobItem fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Blob" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + FilterBlobItem deserializedFilterBlobItem = new FilterBlobItem(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.name = reader.getStringElement(); + } else if ("ContainerName".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.containerName = reader.getStringElement(); + } else if ("Tags".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.tags = BlobTags.fromXml(reader, "Tags"); + } else if ("VersionId".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.versionId = reader.getStringElement(); + } else if ("IsCurrentVersion".equals(elementName.getLocalPart())) { + deserializedFilterBlobItem.isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedFilterBlobItem; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java index 2dc57f848e521..175bd58d01b92 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java @@ -5,57 +5,50 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The result of a Filter Blobs API call. */ -@JacksonXmlRootElement(localName = "EnumerationResults") +/** + * The result of a Filter Blobs API call. + */ @Fluent -public final class FilterBlobSegment { +public final class FilterBlobSegment implements XmlSerializable { /* * The ServiceEndpoint property. */ - @JacksonXmlProperty(localName = "ServiceEndpoint", isAttribute = true) private String serviceEndpoint; /* * The Where property. */ - @JsonProperty(value = "Where", required = true) private String where; - private static final class BlobsWrapper { - @JacksonXmlProperty(localName = "Blob") - private final List items; - - @JsonCreator - private BlobsWrapper(@JacksonXmlProperty(localName = "Blob") List items) { - this.items = items; - } - } - /* * The Blobs property. */ - @JsonProperty(value = "Blobs", required = true) - private BlobsWrapper blobs; + private List blobs; /* * The NextMarker property. */ - @JsonProperty(value = "NextMarker") private String nextMarker; - /** Creates an instance of FilterBlobSegment class. */ - public FilterBlobSegment() {} + /** + * Creates an instance of FilterBlobSegment class. + */ + public FilterBlobSegment() { + } /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -64,7 +57,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the FilterBlobSegment object itself. */ @@ -75,7 +68,7 @@ public FilterBlobSegment setServiceEndpoint(String serviceEndpoint) { /** * Get the where property: The Where property. - * + * * @return the where value. */ public String getWhere() { @@ -84,7 +77,7 @@ public String getWhere() { /** * Set the where property: The Where property. - * + * * @param where the where value to set. * @return the FilterBlobSegment object itself. */ @@ -95,30 +88,30 @@ public FilterBlobSegment setWhere(String where) { /** * Get the blobs property: The Blobs property. - * + * * @return the blobs value. */ public List getBlobs() { if (this.blobs == null) { - this.blobs = new BlobsWrapper(new ArrayList()); + this.blobs = new ArrayList<>(); } - return this.blobs.items; + return this.blobs; } /** * Set the blobs property: The Blobs property. - * + * * @param blobs the blobs value to set. * @return the FilterBlobSegment object itself. */ public FilterBlobSegment setBlobs(List blobs) { - this.blobs = new BlobsWrapper(blobs); + this.blobs = blobs; return this; } /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -127,7 +120,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the FilterBlobSegment object itself. */ @@ -135,4 +128,83 @@ public FilterBlobSegment setNextMarker(String nextMarker) { this.nextMarker = nextMarker; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringElement("Where", this.where); + if (this.blobs != null) { + xmlWriter.writeStartElement("Blobs"); + for (FilterBlobItem element : this.blobs) { + xmlWriter.writeXml(element, "Blob"); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of FilterBlobSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of FilterBlobSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the FilterBlobSegment. + */ + public static FilterBlobSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of FilterBlobSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of FilterBlobSegment if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the FilterBlobSegment. + */ + public static FilterBlobSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + FilterBlobSegment deserializedFilterBlobSegment = new FilterBlobSegment(); + deserializedFilterBlobSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Where".equals(elementName.getLocalPart())) { + deserializedFilterBlobSegment.where = reader.getStringElement(); + } else if ("Blobs".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Blob".equals(elementName.getLocalPart())) { + if (deserializedFilterBlobSegment.blobs == null) { + deserializedFilterBlobSegment.blobs = new ArrayList<>(); + } + deserializedFilterBlobSegment.blobs.add(FilterBlobItem.fromXml(reader, "Blob")); + } else { + reader.skipElement(); + } + } + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedFilterBlobSegment.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedFilterBlobSegment; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java index a409b984b435b..0d835b59d578a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java @@ -4,18 +4,23 @@ package com.azure.storage.blob.implementation.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for FilterBlobsIncludeItem. */ +/** + * Defines values for FilterBlobsIncludeItem. + */ public enum FilterBlobsIncludeItem { - /** Enum value none. */ + /** + * Enum value none. + */ NONE("none"), - /** Enum value versions. */ + /** + * Enum value versions. + */ VERSIONS("versions"); - /** The actual serialized value for a FilterBlobsIncludeItem instance. */ + /** + * The actual serialized value for a FilterBlobsIncludeItem instance. + */ private final String value; FilterBlobsIncludeItem(String value) { @@ -24,11 +29,10 @@ public enum FilterBlobsIncludeItem { /** * Parses a serialized value to a FilterBlobsIncludeItem instance. - * + * * @param value the serialized value to parse. * @return the parsed FilterBlobsIncludeItem object, or null if unable to parse. */ - @JsonCreator public static FilterBlobsIncludeItem fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static FilterBlobsIncludeItem fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java index d6824b17373dd..e3bac9a2e9d87 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java @@ -5,25 +5,33 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** json text configuration. */ -@JacksonXmlRootElement(localName = "JsonTextConfiguration") +/** + * json text configuration. + */ @Fluent -public final class JsonTextConfiguration { +public final class JsonTextConfiguration implements XmlSerializable { /* * The string used to separate records. */ - @JsonProperty(value = "RecordSeparator") private String recordSeparator; - /** Creates an instance of JsonTextConfiguration class. */ - public JsonTextConfiguration() {} + /** + * Creates an instance of JsonTextConfiguration class. + */ + public JsonTextConfiguration() { + } /** * Get the recordSeparator property: The string used to separate records. - * + * * @return the recordSeparator value. */ public String getRecordSeparator() { @@ -32,7 +40,7 @@ public String getRecordSeparator() { /** * Set the recordSeparator property: The string used to separate records. - * + * * @param recordSeparator the recordSeparator value to set. * @return the JsonTextConfiguration object itself. */ @@ -40,4 +48,58 @@ public JsonTextConfiguration setRecordSeparator(String recordSeparator) { this.recordSeparator = recordSeparator; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "JsonTextConfiguration" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("RecordSeparator", this.recordSeparator); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of JsonTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of JsonTextConfiguration if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the JsonTextConfiguration. + */ + public static JsonTextConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of JsonTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of JsonTextConfiguration if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the JsonTextConfiguration. + */ + public static JsonTextConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "JsonTextConfiguration" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + JsonTextConfiguration deserializedJsonTextConfiguration = new JsonTextConfiguration(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("RecordSeparator".equals(elementName.getLocalPart())) { + deserializedJsonTextConfiguration.recordSeparator = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedJsonTextConfiguration; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java index a59edd4975d67..301e960ded1be 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java @@ -5,62 +5,63 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** An enumeration of blobs. */ -@JacksonXmlRootElement(localName = "EnumerationResults") +/** + * An enumeration of blobs. + */ @Fluent -public final class ListBlobsFlatSegmentResponse { +public final class ListBlobsFlatSegmentResponse implements XmlSerializable { /* * The ServiceEndpoint property. */ - @JacksonXmlProperty(localName = "ServiceEndpoint", isAttribute = true) private String serviceEndpoint; /* * The ContainerName property. */ - @JacksonXmlProperty(localName = "ContainerName", isAttribute = true) private String containerName; /* * The Prefix property. */ - @JsonProperty(value = "Prefix", required = true) private String prefix; /* * The Marker property. */ - @JsonProperty(value = "Marker", required = true) private String marker; /* * The MaxResults property. */ - @JsonProperty(value = "MaxResults", required = true) private int maxResults; /* * The Segment property. */ - @JsonProperty(value = "Blobs", required = true) private BlobFlatListSegment segment; /* * The NextMarker property. */ - @JsonProperty(value = "NextMarker", required = true) private String nextMarker; - /** Creates an instance of ListBlobsFlatSegmentResponse class. */ - public ListBlobsFlatSegmentResponse() {} + /** + * Creates an instance of ListBlobsFlatSegmentResponse class. + */ + public ListBlobsFlatSegmentResponse() { + } /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -69,7 +70,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -80,7 +81,7 @@ public ListBlobsFlatSegmentResponse setServiceEndpoint(String serviceEndpoint) { /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -89,7 +90,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -100,7 +101,7 @@ public ListBlobsFlatSegmentResponse setContainerName(String containerName) { /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -109,7 +110,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -120,7 +121,7 @@ public ListBlobsFlatSegmentResponse setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -129,7 +130,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -140,7 +141,7 @@ public ListBlobsFlatSegmentResponse setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public int getMaxResults() { @@ -149,7 +150,7 @@ public int getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -160,7 +161,7 @@ public ListBlobsFlatSegmentResponse setMaxResults(int maxResults) { /** * Get the segment property: The Segment property. - * + * * @return the segment value. */ public BlobFlatListSegment getSegment() { @@ -169,7 +170,7 @@ public BlobFlatListSegment getSegment() { /** * Set the segment property: The Segment property. - * + * * @param segment the segment value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -180,7 +181,7 @@ public ListBlobsFlatSegmentResponse setSegment(BlobFlatListSegment segment) { /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -189,7 +190,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the ListBlobsFlatSegmentResponse object itself. */ @@ -197,4 +198,77 @@ public ListBlobsFlatSegmentResponse setNextMarker(String nextMarker) { this.nextMarker = nextMarker; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringAttribute("ContainerName", this.containerName); + xmlWriter.writeStringElement("Prefix", this.prefix); + xmlWriter.writeStringElement("Marker", this.marker); + xmlWriter.writeIntElement("MaxResults", this.maxResults); + xmlWriter.writeXml(this.segment, "Blobs"); + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ListBlobsFlatSegmentResponse if the XmlReader was pointing to an instance of it, or null + * if it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ListBlobsFlatSegmentResponse. + */ + public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ListBlobsFlatSegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ListBlobsFlatSegmentResponse if the XmlReader was pointing to an instance of it, or null + * if it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ListBlobsFlatSegmentResponse. + */ + public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ListBlobsFlatSegmentResponse deserializedListBlobsFlatSegmentResponse = new ListBlobsFlatSegmentResponse(); + deserializedListBlobsFlatSegmentResponse.serviceEndpoint + = reader.getStringAttribute(null, "ServiceEndpoint"); + deserializedListBlobsFlatSegmentResponse.containerName = reader.getStringAttribute(null, "ContainerName"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Prefix".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.prefix = reader.getStringElement(); + } else if ("Marker".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.marker = reader.getStringElement(); + } else if ("MaxResults".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.maxResults = reader.getIntElement(); + } else if ("Blobs".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.segment = BlobFlatListSegment.fromXml(reader, "Blobs"); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedListBlobsFlatSegmentResponse.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedListBlobsFlatSegmentResponse; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java index 6355a79f27118..d958e54477773 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java @@ -5,68 +5,68 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** An enumeration of blobs. */ -@JacksonXmlRootElement(localName = "EnumerationResults") +/** + * An enumeration of blobs. + */ @Fluent -public final class ListBlobsHierarchySegmentResponse { +public final class ListBlobsHierarchySegmentResponse implements XmlSerializable { /* * The ServiceEndpoint property. */ - @JacksonXmlProperty(localName = "ServiceEndpoint", isAttribute = true) private String serviceEndpoint; /* * The ContainerName property. */ - @JacksonXmlProperty(localName = "ContainerName", isAttribute = true) private String containerName; /* * The Prefix property. */ - @JsonProperty(value = "Prefix", required = true) private String prefix; /* * The Marker property. */ - @JsonProperty(value = "Marker", required = true) private String marker; /* * The MaxResults property. */ - @JsonProperty(value = "MaxResults", required = true) private int maxResults; /* * The Delimiter property. */ - @JsonProperty(value = "Delimiter", required = true) private String delimiter; /* * The Segment property. */ - @JsonProperty(value = "Blobs", required = true) private BlobHierarchyListSegment segment; /* * The NextMarker property. */ - @JsonProperty(value = "NextMarker", required = true) private String nextMarker; - /** Creates an instance of ListBlobsHierarchySegmentResponse class. */ - public ListBlobsHierarchySegmentResponse() {} + /** + * Creates an instance of ListBlobsHierarchySegmentResponse class. + */ + public ListBlobsHierarchySegmentResponse() { + } /** * Get the serviceEndpoint property: The ServiceEndpoint property. - * + * * @return the serviceEndpoint value. */ public String getServiceEndpoint() { @@ -75,7 +75,7 @@ public String getServiceEndpoint() { /** * Set the serviceEndpoint property: The ServiceEndpoint property. - * + * * @param serviceEndpoint the serviceEndpoint value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -86,7 +86,7 @@ public ListBlobsHierarchySegmentResponse setServiceEndpoint(String serviceEndpoi /** * Get the containerName property: The ContainerName property. - * + * * @return the containerName value. */ public String getContainerName() { @@ -95,7 +95,7 @@ public String getContainerName() { /** * Set the containerName property: The ContainerName property. - * + * * @param containerName the containerName value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -106,7 +106,7 @@ public ListBlobsHierarchySegmentResponse setContainerName(String containerName) /** * Get the prefix property: The Prefix property. - * + * * @return the prefix value. */ public String getPrefix() { @@ -115,7 +115,7 @@ public String getPrefix() { /** * Set the prefix property: The Prefix property. - * + * * @param prefix the prefix value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -126,7 +126,7 @@ public ListBlobsHierarchySegmentResponse setPrefix(String prefix) { /** * Get the marker property: The Marker property. - * + * * @return the marker value. */ public String getMarker() { @@ -135,7 +135,7 @@ public String getMarker() { /** * Set the marker property: The Marker property. - * + * * @param marker the marker value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -146,7 +146,7 @@ public ListBlobsHierarchySegmentResponse setMarker(String marker) { /** * Get the maxResults property: The MaxResults property. - * + * * @return the maxResults value. */ public int getMaxResults() { @@ -155,7 +155,7 @@ public int getMaxResults() { /** * Set the maxResults property: The MaxResults property. - * + * * @param maxResults the maxResults value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -166,7 +166,7 @@ public ListBlobsHierarchySegmentResponse setMaxResults(int maxResults) { /** * Get the delimiter property: The Delimiter property. - * + * * @return the delimiter value. */ public String getDelimiter() { @@ -175,7 +175,7 @@ public String getDelimiter() { /** * Set the delimiter property: The Delimiter property. - * + * * @param delimiter the delimiter value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -186,7 +186,7 @@ public ListBlobsHierarchySegmentResponse setDelimiter(String delimiter) { /** * Get the segment property: The Segment property. - * + * * @return the segment value. */ public BlobHierarchyListSegment getSegment() { @@ -195,7 +195,7 @@ public BlobHierarchyListSegment getSegment() { /** * Set the segment property: The Segment property. - * + * * @param segment the segment value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -206,7 +206,7 @@ public ListBlobsHierarchySegmentResponse setSegment(BlobHierarchyListSegment seg /** * Get the nextMarker property: The NextMarker property. - * + * * @return the nextMarker value. */ public String getNextMarker() { @@ -215,7 +215,7 @@ public String getNextMarker() { /** * Set the nextMarker property: The NextMarker property. - * + * * @param nextMarker the nextMarker value to set. * @return the ListBlobsHierarchySegmentResponse object itself. */ @@ -223,4 +223,83 @@ public ListBlobsHierarchySegmentResponse setNextMarker(String nextMarker) { this.nextMarker = nextMarker; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); + xmlWriter.writeStringAttribute("ContainerName", this.containerName); + xmlWriter.writeStringElement("Prefix", this.prefix); + xmlWriter.writeStringElement("Marker", this.marker); + xmlWriter.writeIntElement("MaxResults", this.maxResults); + xmlWriter.writeStringElement("Delimiter", this.delimiter); + xmlWriter.writeXml(this.segment, "Blobs"); + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ListBlobsHierarchySegmentResponse if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ListBlobsHierarchySegmentResponse. + */ + public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ListBlobsHierarchySegmentResponse from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ListBlobsHierarchySegmentResponse if the XmlReader was pointing to an instance of it, or + * null if it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ListBlobsHierarchySegmentResponse. + */ + public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "EnumerationResults" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ListBlobsHierarchySegmentResponse deserializedListBlobsHierarchySegmentResponse + = new ListBlobsHierarchySegmentResponse(); + deserializedListBlobsHierarchySegmentResponse.serviceEndpoint + = reader.getStringAttribute(null, "ServiceEndpoint"); + deserializedListBlobsHierarchySegmentResponse.containerName + = reader.getStringAttribute(null, "ContainerName"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Prefix".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.prefix = reader.getStringElement(); + } else if ("Marker".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.marker = reader.getStringElement(); + } else if ("MaxResults".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.maxResults = reader.getIntElement(); + } else if ("Delimiter".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.delimiter = reader.getStringElement(); + } else if ("Blobs".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.segment + = BlobHierarchyListSegment.fromXml(reader, "Blobs"); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedListBlobsHierarchySegmentResponse.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedListBlobsHierarchySegmentResponse; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java index 1eef7b10614d8..8eda0bd0b09b5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java @@ -9,100 +9,86 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The PageBlobsClearPagesHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsClearPagesHeaders model. + */ @Fluent public final class PageBlobsClearPagesHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsClearPagesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { @@ -121,7 +107,7 @@ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -139,7 +125,7 @@ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -148,7 +134,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -159,7 +145,7 @@ public PageBlobsClearPagesHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -168,7 +154,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -179,7 +165,7 @@ public PageBlobsClearPagesHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -188,7 +174,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -199,7 +185,7 @@ public PageBlobsClearPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -208,7 +194,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -219,7 +205,7 @@ public PageBlobsClearPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceN /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -231,7 +217,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -246,7 +232,7 @@ public PageBlobsClearPagesHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -255,7 +241,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -266,7 +252,7 @@ public PageBlobsClearPagesHeaders setXMsEncryptionKeySha256(String xMsEncryption /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -275,7 +261,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -286,7 +272,7 @@ public PageBlobsClearPagesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -295,7 +281,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -306,7 +292,7 @@ public PageBlobsClearPagesHeaders setXMsRequestServerEncrypted(Boolean xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -315,7 +301,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -326,7 +312,7 @@ public PageBlobsClearPagesHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -338,7 +324,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsClearPagesHeaders object itself. */ @@ -353,7 +339,7 @@ public PageBlobsClearPagesHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -362,7 +348,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsClearPagesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java index 15de455e3a27c..1c24595a977a8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java @@ -9,60 +9,51 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.models.CopyStatusType; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The PageBlobsCopyIncrementalHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsCopyIncrementalHeaders model. + */ @Fluent public final class PageBlobsCopyIncrementalHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-copy-id property. */ - @JsonProperty(value = "x-ms-copy-id") private String xMsCopyId; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-copy-status property. */ - @JsonProperty(value = "x-ms-copy-status") private CopyStatusType xMsCopyStatus; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -71,12 +62,10 @@ public final class PageBlobsCopyIncrementalHeaders { private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCopyIncrementalHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { @@ -91,7 +80,7 @@ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { if (xMsCopyStatus != null) { this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -101,7 +90,7 @@ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -110,7 +99,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -121,7 +110,7 @@ public PageBlobsCopyIncrementalHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsCopyId property: The x-ms-copy-id property. - * + * * @return the xMsCopyId value. */ public String getXMsCopyId() { @@ -130,7 +119,7 @@ public String getXMsCopyId() { /** * Set the xMsCopyId property: The x-ms-copy-id property. - * + * * @param xMsCopyId the xMsCopyId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -141,7 +130,7 @@ public PageBlobsCopyIncrementalHeaders setXMsCopyId(String xMsCopyId) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -150,7 +139,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -161,7 +150,7 @@ public PageBlobsCopyIncrementalHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -173,7 +162,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -188,7 +177,7 @@ public PageBlobsCopyIncrementalHeaders setLastModified(OffsetDateTime lastModifi /** * Get the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @return the xMsCopyStatus value. */ public CopyStatusType getXMsCopyStatus() { @@ -197,7 +186,7 @@ public CopyStatusType getXMsCopyStatus() { /** * Set the xMsCopyStatus property: The x-ms-copy-status property. - * + * * @param xMsCopyStatus the xMsCopyStatus value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -208,7 +197,7 @@ public PageBlobsCopyIncrementalHeaders setXMsCopyStatus(CopyStatusType xMsCopySt /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -217,7 +206,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -228,7 +217,7 @@ public PageBlobsCopyIncrementalHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -237,7 +226,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ @@ -248,7 +237,7 @@ public PageBlobsCopyIncrementalHeaders setXMsClientRequestId(String xMsClientReq /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -260,7 +249,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsCopyIncrementalHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java index 5163033813e3b..f661ad002b2e5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java @@ -9,99 +9,85 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The PageBlobsCreateHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsCreateHeaders model. + */ @Fluent public final class PageBlobsCreateHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-version-id property. */ - @JsonProperty(value = "x-ms-version-id") private String xMsVersionId; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCreateHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { @@ -113,7 +99,7 @@ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { } this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -132,7 +118,7 @@ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -141,7 +127,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -152,7 +138,7 @@ public PageBlobsCreateHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -161,7 +147,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -172,7 +158,7 @@ public PageBlobsCreateHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -184,7 +170,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -199,7 +185,7 @@ public PageBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsVersionId property: The x-ms-version-id property. - * + * * @return the xMsVersionId value. */ public String getXMsVersionId() { @@ -208,7 +194,7 @@ public String getXMsVersionId() { /** * Set the xMsVersionId property: The x-ms-version-id property. - * + * * @param xMsVersionId the xMsVersionId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -219,7 +205,7 @@ public PageBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -228,7 +214,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -239,7 +225,7 @@ public PageBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeyS /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -248,7 +234,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -259,7 +245,7 @@ public PageBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -268,7 +254,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -279,7 +265,7 @@ public PageBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestSer /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -288,7 +274,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -299,7 +285,7 @@ public PageBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -311,7 +297,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -326,7 +312,7 @@ public PageBlobsCreateHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -335,7 +321,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsCreateHeaders object itself. */ @@ -346,7 +332,7 @@ public PageBlobsCreateHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -355,7 +341,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsCreateHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java index e6845dc096d85..89ba2b3333fd9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java @@ -8,67 +8,57 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The PageBlobsGetPageRangesDiffHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsGetPageRangesDiffHeaders model. + */ @Fluent public final class PageBlobsGetPageRangesDiffHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-blob-content-length property. */ - @JsonProperty(value = "x-ms-blob-content-length") private Long xMsBlobContentLength; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = - HttpHeaderName.fromString("x-ms-blob-content-length"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH + = HttpHeaderName.fromString("x-ms-blob-content-length"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsGetPageRangesDiffHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { @@ -82,7 +72,7 @@ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -92,7 +82,7 @@ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -101,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -112,7 +102,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -121,7 +111,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -132,7 +122,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsBlobContentLength(Long xMsBlobCon /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -141,7 +131,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -152,7 +142,7 @@ public PageBlobsGetPageRangesDiffHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -164,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -179,7 +169,7 @@ public PageBlobsGetPageRangesDiffHeaders setLastModified(OffsetDateTime lastModi /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -188,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -199,7 +189,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -208,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ @@ -219,7 +209,7 @@ public PageBlobsGetPageRangesDiffHeaders setXMsClientRequestId(String xMsClientR /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -231,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsGetPageRangesDiffHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java index 4db6072846a9d..1816501497dbd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java @@ -8,67 +8,57 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The PageBlobsGetPageRangesHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsGetPageRangesHeaders model. + */ @Fluent public final class PageBlobsGetPageRangesHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-blob-content-length property. */ - @JsonProperty(value = "x-ms-blob-content-length") private Long xMsBlobContentLength; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = - HttpHeaderName.fromString("x-ms-blob-content-length"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH + = HttpHeaderName.fromString("x-ms-blob-content-length"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsGetPageRangesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { @@ -82,7 +72,7 @@ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -92,7 +82,7 @@ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -101,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -112,7 +102,7 @@ public PageBlobsGetPageRangesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @return the xMsBlobContentLength value. */ public Long getXMsBlobContentLength() { @@ -121,7 +111,7 @@ public Long getXMsBlobContentLength() { /** * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * + * * @param xMsBlobContentLength the xMsBlobContentLength value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -132,7 +122,7 @@ public PageBlobsGetPageRangesHeaders setXMsBlobContentLength(Long xMsBlobContent /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -141,7 +131,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -152,7 +142,7 @@ public PageBlobsGetPageRangesHeaders setETag(String eTag) { /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -164,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -179,7 +169,7 @@ public PageBlobsGetPageRangesHeaders setLastModified(OffsetDateTime lastModified /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -188,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -199,7 +189,7 @@ public PageBlobsGetPageRangesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -208,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ @@ -219,7 +209,7 @@ public PageBlobsGetPageRangesHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -231,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsGetPageRangesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java index eab8a274864df..35bb70586ca28 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java @@ -8,67 +8,57 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The PageBlobsResizeHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsResizeHeaders model. + */ @Fluent public final class PageBlobsResizeHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsResizeHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { @@ -82,7 +72,7 @@ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -92,7 +82,7 @@ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -101,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -112,7 +102,7 @@ public PageBlobsResizeHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -121,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -132,7 +122,7 @@ public PageBlobsResizeHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -141,7 +131,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -152,7 +142,7 @@ public PageBlobsResizeHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumbe /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -164,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -179,7 +169,7 @@ public PageBlobsResizeHeaders setLastModified(OffsetDateTime lastModified) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -188,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -199,7 +189,7 @@ public PageBlobsResizeHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -208,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsResizeHeaders object itself. */ @@ -219,7 +209,7 @@ public PageBlobsResizeHeaders setXMsClientRequestId(String xMsClientRequestId) { /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -231,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsResizeHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberHeaders.java index 79c26b97ea809..b1996ed6895f6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberHeaders.java @@ -8,67 +8,57 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The PageBlobsUpdateSequenceNumberHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsUpdateSequenceNumberHeaders model. + */ @Fluent public final class PageBlobsUpdateSequenceNumberHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); - - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsUpdateSequenceNumberHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsUpdateSequenceNumberHeaders(HttpHeaders rawHeaders) { @@ -82,7 +72,7 @@ public PageBlobsUpdateSequenceNumberHeaders(HttpHeaders rawHeaders) { if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -92,7 +82,7 @@ public PageBlobsUpdateSequenceNumberHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -101,7 +91,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -112,7 +102,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -121,7 +111,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -132,7 +122,7 @@ public PageBlobsUpdateSequenceNumberHeaders setETag(String eTag) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -141,7 +131,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -152,7 +142,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsBlobSequenceNumber(Long xMsBlo /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -164,7 +154,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -179,7 +169,7 @@ public PageBlobsUpdateSequenceNumberHeaders setLastModified(OffsetDateTime lastM /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -188,7 +178,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -199,7 +189,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -208,7 +198,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ @@ -219,7 +209,7 @@ public PageBlobsUpdateSequenceNumberHeaders setXMsClientRequestId(String xMsClie /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -231,7 +221,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUpdateSequenceNumberHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLHeaders.java index f998d8b4a5f24..e69d888db4324 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLHeaders.java @@ -9,102 +9,88 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The PageBlobsUploadPagesFromURLHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsUploadPagesFromURLHeaders model. + */ @Fluent public final class PageBlobsUploadPagesFromURLHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsUploadPagesFromURLHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsUploadPagesFromURLHeaders(HttpHeaders rawHeaders) { @@ -123,7 +109,7 @@ public PageBlobsUploadPagesFromURLHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -141,7 +127,7 @@ public PageBlobsUploadPagesFromURLHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -150,7 +136,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -161,7 +147,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -170,7 +156,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -181,7 +167,7 @@ public PageBlobsUploadPagesFromURLHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -190,7 +176,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -201,7 +187,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsContentCrc64(byte[] xMsContentCr /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -210,7 +196,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -221,7 +207,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsBlobSequenceNumber(Long xMsBlobS /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -233,7 +219,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -248,7 +234,7 @@ public PageBlobsUploadPagesFromURLHeaders setLastModified(OffsetDateTime lastMod /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -257,7 +243,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -268,7 +254,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsEncryptionKeySha256(String xMsEn /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -277,7 +263,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -288,7 +274,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -297,7 +283,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -308,7 +294,7 @@ public PageBlobsUploadPagesFromURLHeaders setXMsRequestServerEncrypted(Boolean x /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -320,7 +306,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -335,7 +321,7 @@ public PageBlobsUploadPagesFromURLHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -344,7 +330,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ @@ -355,7 +341,7 @@ public PageBlobsUploadPagesFromURLHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -364,7 +350,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsUploadPagesFromURLHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java index 264f25ba757c5..ed599e6f701c8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java @@ -9,108 +9,93 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Base64; -/** The PageBlobsUploadPagesHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The PageBlobsUploadPagesHeaders model. + */ @Fluent public final class PageBlobsUploadPagesHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-content-crc64 property. */ - @JsonProperty(value = "x-ms-content-crc64") private byte[] xMsContentCrc64; /* * The x-ms-blob-sequence-number property. */ - @JsonProperty(value = "x-ms-blob-sequence-number") private Long xMsBlobSequenceNumber; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-encryption-key-sha256 property. */ - @JsonProperty(value = "x-ms-encryption-key-sha256") private String xMsEncryptionKeySha256; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-request-server-encrypted property. */ - @JsonProperty(value = "x-ms-request-server-encrypted") private Boolean xMsRequestServerEncrypted; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; /* * The Content-MD5 property. */ - @JsonProperty(value = "Content-MD5") private byte[] contentMD5; /* * The x-ms-encryption-scope property. */ - @JsonProperty(value = "x-ms-encryption-scope") private String xMsEncryptionScope; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = - HttpHeaderName.fromString("x-ms-blob-sequence-number"); + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = - HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = - HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsUploadPagesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { @@ -129,7 +114,7 @@ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { this.lastModified = new DateTimeRfc1123(lastModified); } this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); if (xMsRequestServerEncrypted != null) { this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); @@ -148,7 +133,7 @@ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -157,7 +142,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -168,7 +153,7 @@ public PageBlobsUploadPagesHeaders setXMsVersion(String xMsVersion) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ public String getETag() { @@ -177,7 +162,7 @@ public String getETag() { /** * Set the eTag property: The ETag property. - * + * * @param eTag the eTag value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -188,7 +173,7 @@ public PageBlobsUploadPagesHeaders setETag(String eTag) { /** * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @return the xMsContentCrc64 value. */ public byte[] getXMsContentCrc64() { @@ -197,7 +182,7 @@ public byte[] getXMsContentCrc64() { /** * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * + * * @param xMsContentCrc64 the xMsContentCrc64 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -208,7 +193,7 @@ public PageBlobsUploadPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { /** * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @return the xMsBlobSequenceNumber value. */ public Long getXMsBlobSequenceNumber() { @@ -217,7 +202,7 @@ public Long getXMsBlobSequenceNumber() { /** * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -228,7 +213,7 @@ public PageBlobsUploadPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequence /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -240,7 +225,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -255,7 +240,7 @@ public PageBlobsUploadPagesHeaders setLastModified(OffsetDateTime lastModified) /** * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @return the xMsEncryptionKeySha256 value. */ public String getXMsEncryptionKeySha256() { @@ -264,7 +249,7 @@ public String getXMsEncryptionKeySha256() { /** * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * + * * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -275,7 +260,7 @@ public PageBlobsUploadPagesHeaders setXMsEncryptionKeySha256(String xMsEncryptio /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -284,7 +269,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -295,7 +280,7 @@ public PageBlobsUploadPagesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @return the xMsRequestServerEncrypted value. */ public Boolean isXMsRequestServerEncrypted() { @@ -304,7 +289,7 @@ public Boolean isXMsRequestServerEncrypted() { /** * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * + * * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -315,7 +300,7 @@ public PageBlobsUploadPagesHeaders setXMsRequestServerEncrypted(Boolean xMsReque /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -324,7 +309,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -335,7 +320,7 @@ public PageBlobsUploadPagesHeaders setXMsClientRequestId(String xMsClientRequest /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -347,7 +332,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -362,7 +347,7 @@ public PageBlobsUploadPagesHeaders setDate(OffsetDateTime date) { /** * Get the contentMD5 property: The Content-MD5 property. - * + * * @return the contentMD5 value. */ public byte[] getContentMD5() { @@ -371,7 +356,7 @@ public byte[] getContentMD5() { /** * Set the contentMD5 property: The Content-MD5 property. - * + * * @param contentMD5 the contentMD5 value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ @@ -382,7 +367,7 @@ public PageBlobsUploadPagesHeaders setContentMD5(byte[] contentMD5) { /** * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @return the xMsEncryptionScope value. */ public String getXMsEncryptionScope() { @@ -391,7 +376,7 @@ public String getXMsEncryptionScope() { /** * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * + * * @param xMsEncryptionScope the xMsEncryptionScope value to set. * @return the PageBlobsUploadPagesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java index a023168f38dc9..95d832fa9fafe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java @@ -5,66 +5,89 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PremiumPageBlobAccessTier. */ +/** + * Defines values for PremiumPageBlobAccessTier. + */ public final class PremiumPageBlobAccessTier extends ExpandableStringEnum { - /** Static value P4 for PremiumPageBlobAccessTier. */ + /** + * Static value P4 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P4 = fromString("P4"); - /** Static value P6 for PremiumPageBlobAccessTier. */ + /** + * Static value P6 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P6 = fromString("P6"); - /** Static value P10 for PremiumPageBlobAccessTier. */ + /** + * Static value P10 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P10 = fromString("P10"); - /** Static value P15 for PremiumPageBlobAccessTier. */ + /** + * Static value P15 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P15 = fromString("P15"); - /** Static value P20 for PremiumPageBlobAccessTier. */ + /** + * Static value P20 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P20 = fromString("P20"); - /** Static value P30 for PremiumPageBlobAccessTier. */ + /** + * Static value P30 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P30 = fromString("P30"); - /** Static value P40 for PremiumPageBlobAccessTier. */ + /** + * Static value P40 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P40 = fromString("P40"); - /** Static value P50 for PremiumPageBlobAccessTier. */ + /** + * Static value P50 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P50 = fromString("P50"); - /** Static value P60 for PremiumPageBlobAccessTier. */ + /** + * Static value P60 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P60 = fromString("P60"); - /** Static value P70 for PremiumPageBlobAccessTier. */ + /** + * Static value P70 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P70 = fromString("P70"); - /** Static value P80 for PremiumPageBlobAccessTier. */ + /** + * Static value P80 for PremiumPageBlobAccessTier. + */ public static final PremiumPageBlobAccessTier P80 = fromString("P80"); /** * Creates a new instance of PremiumPageBlobAccessTier value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public PremiumPageBlobAccessTier() {} + public PremiumPageBlobAccessTier() { + } /** * Creates or finds a PremiumPageBlobAccessTier from its string representation. - * + * * @param name a name to look for. * @return the corresponding PremiumPageBlobAccessTier. */ - @JsonCreator public static PremiumPageBlobAccessTier fromString(String name) { return fromString(name, PremiumPageBlobAccessTier.class); } /** * Gets known PremiumPageBlobAccessTier values. - * + * * @return known PremiumPageBlobAccessTier values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java index eb0a64a215131..dd547af56dd18 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java @@ -5,49 +5,53 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** The QueryFormat model. */ -@JacksonXmlRootElement(localName = "QueryFormat") +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * The QueryFormat model. + */ @Fluent -public final class QueryFormat { +public final class QueryFormat implements XmlSerializable { /* * The quick query format type. */ - @JsonProperty(value = "Type", required = true) private QueryFormatType type; /* * Groups the settings used for interpreting the blob data if the blob is delimited text formatted. */ - @JsonProperty(value = "DelimitedTextConfiguration") private DelimitedTextConfiguration delimitedTextConfiguration; /* * json text configuration */ - @JsonProperty(value = "JsonTextConfiguration") private JsonTextConfiguration jsonTextConfiguration; /* * Groups the settings used for formatting the response if the response should be Arrow formatted. */ - @JsonProperty(value = "ArrowConfiguration") private ArrowConfiguration arrowConfiguration; /* * parquet configuration */ - @JsonProperty(value = "ParquetTextConfiguration") private Object parquetTextConfiguration; - /** Creates an instance of QueryFormat class. */ - public QueryFormat() {} + /** + * Creates an instance of QueryFormat class. + */ + public QueryFormat() { + } /** * Get the type property: The quick query format type. - * + * * @return the type value. */ public QueryFormatType getType() { @@ -56,7 +60,7 @@ public QueryFormatType getType() { /** * Set the type property: The quick query format type. - * + * * @param type the type value to set. * @return the QueryFormat object itself. */ @@ -68,7 +72,7 @@ public QueryFormat setType(QueryFormatType type) { /** * Get the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob * is delimited text formatted. - * + * * @return the delimitedTextConfiguration value. */ public DelimitedTextConfiguration getDelimitedTextConfiguration() { @@ -78,7 +82,7 @@ public DelimitedTextConfiguration getDelimitedTextConfiguration() { /** * Set the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob * is delimited text formatted. - * + * * @param delimitedTextConfiguration the delimitedTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -89,7 +93,7 @@ public QueryFormat setDelimitedTextConfiguration(DelimitedTextConfiguration deli /** * Get the jsonTextConfiguration property: json text configuration. - * + * * @return the jsonTextConfiguration value. */ public JsonTextConfiguration getJsonTextConfiguration() { @@ -98,7 +102,7 @@ public JsonTextConfiguration getJsonTextConfiguration() { /** * Set the jsonTextConfiguration property: json text configuration. - * + * * @param jsonTextConfiguration the jsonTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -110,7 +114,7 @@ public QueryFormat setJsonTextConfiguration(JsonTextConfiguration jsonTextConfig /** * Get the arrowConfiguration property: Groups the settings used for formatting the response if the response should * be Arrow formatted. - * + * * @return the arrowConfiguration value. */ public ArrowConfiguration getArrowConfiguration() { @@ -120,7 +124,7 @@ public ArrowConfiguration getArrowConfiguration() { /** * Set the arrowConfiguration property: Groups the settings used for formatting the response if the response should * be Arrow formatted. - * + * * @param arrowConfiguration the arrowConfiguration value to set. * @return the QueryFormat object itself. */ @@ -131,7 +135,7 @@ public QueryFormat setArrowConfiguration(ArrowConfiguration arrowConfiguration) /** * Get the parquetTextConfiguration property: parquet configuration. - * + * * @return the parquetTextConfiguration value. */ public Object getParquetTextConfiguration() { @@ -140,7 +144,7 @@ public Object getParquetTextConfiguration() { /** * Set the parquetTextConfiguration property: parquet configuration. - * + * * @param parquetTextConfiguration the parquetTextConfiguration value to set. * @return the QueryFormat object itself. */ @@ -148,4 +152,75 @@ public QueryFormat setParquetTextConfiguration(Object parquetTextConfiguration) this.parquetTextConfiguration = parquetTextConfiguration; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryFormat" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Type", this.type == null ? null : this.type.toString()); + xmlWriter.writeXml(this.delimitedTextConfiguration, "DelimitedTextConfiguration"); + xmlWriter.writeXml(this.jsonTextConfiguration, "JsonTextConfiguration"); + xmlWriter.writeXml(this.arrowConfiguration, "ArrowConfiguration"); + xmlWriter.writeStartElement("ParquetTextConfiguration").writeEndElement(); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of QueryFormat from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of QueryFormat if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the QueryFormat. + */ + public static QueryFormat fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of QueryFormat from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of QueryFormat if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the QueryFormat. + */ + public static QueryFormat fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryFormat" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + QueryFormat deserializedQueryFormat = new QueryFormat(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Type".equals(elementName.getLocalPart())) { + deserializedQueryFormat.type = QueryFormatType.fromString(reader.getStringElement()); + } else if ("DelimitedTextConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.delimitedTextConfiguration + = DelimitedTextConfiguration.fromXml(reader, "DelimitedTextConfiguration"); + } else if ("JsonTextConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.jsonTextConfiguration + = JsonTextConfiguration.fromXml(reader, "JsonTextConfiguration"); + } else if ("ArrowConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.arrowConfiguration + = ArrowConfiguration.fromXml(reader, "ArrowConfiguration"); + } else if ("ParquetTextConfiguration".equals(elementName.getLocalPart())) { + deserializedQueryFormat.parquetTextConfiguration = new Object(); + xmlReader.skipElement(); + } else { + reader.skipElement(); + } + } + + return deserializedQueryFormat; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java index b237347fc9ca9..677dfb3dc5f5e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java @@ -4,24 +4,33 @@ package com.azure.storage.blob.implementation.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The quick query format type. */ +/** + * The quick query format type. + */ public enum QueryFormatType { - /** Enum value delimited. */ + /** + * Enum value delimited. + */ DELIMITED("delimited"), - /** Enum value json. */ + /** + * Enum value json. + */ JSON("json"), - /** Enum value arrow. */ + /** + * Enum value arrow. + */ ARROW("arrow"), - /** Enum value parquet. */ + /** + * Enum value parquet. + */ PARQUET("parquet"); - /** The actual serialized value for a QueryFormatType instance. */ + /** + * The actual serialized value for a QueryFormatType instance. + */ private final String value; QueryFormatType(String value) { @@ -30,11 +39,10 @@ public enum QueryFormatType { /** * Parses a serialized value to a QueryFormatType instance. - * + * * @param value the serialized value to parse. * @return the parsed QueryFormatType object, or null if unable to parse. */ - @JsonCreator public static QueryFormatType fromString(String value) { if (value == null) { return null; @@ -48,8 +56,9 @@ public static QueryFormatType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java index f1a9cb968fa29..8fd6d83695525 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java @@ -5,45 +5,48 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Groups the set of query request settings. */ -@JacksonXmlRootElement(localName = "QueryRequest") +/** + * Groups the set of query request settings. + */ @Fluent -public final class QueryRequest { +public final class QueryRequest implements XmlSerializable { /* * Required. The type of the provided query expression. */ - @JsonProperty(value = "QueryType", required = true) - private String queryType; + private String queryType = "SQL"; /* * The query expression in SQL. The maximum size of the query expression is 256KiB. */ - @JsonProperty(value = "Expression", required = true) private String expression; /* * The InputSerialization property. */ - @JsonProperty(value = "InputSerialization") private QuerySerialization inputSerialization; /* * The OutputSerialization property. */ - @JsonProperty(value = "OutputSerialization") private QuerySerialization outputSerialization; - /** Creates an instance of QueryRequest class. */ + /** + * Creates an instance of QueryRequest class. + */ public QueryRequest() { - queryType = "SQL"; } /** * Get the queryType property: Required. The type of the provided query expression. - * + * * @return the queryType value. */ public String getQueryType() { @@ -52,7 +55,7 @@ public String getQueryType() { /** * Set the queryType property: Required. The type of the provided query expression. - * + * * @param queryType the queryType value to set. * @return the QueryRequest object itself. */ @@ -63,7 +66,7 @@ public QueryRequest setQueryType(String queryType) { /** * Get the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. - * + * * @return the expression value. */ public String getExpression() { @@ -72,7 +75,7 @@ public String getExpression() { /** * Set the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. - * + * * @param expression the expression value to set. * @return the QueryRequest object itself. */ @@ -83,7 +86,7 @@ public QueryRequest setExpression(String expression) { /** * Get the inputSerialization property: The InputSerialization property. - * + * * @return the inputSerialization value. */ public QuerySerialization getInputSerialization() { @@ -92,7 +95,7 @@ public QuerySerialization getInputSerialization() { /** * Set the inputSerialization property: The InputSerialization property. - * + * * @param inputSerialization the inputSerialization value to set. * @return the QueryRequest object itself. */ @@ -103,7 +106,7 @@ public QueryRequest setInputSerialization(QuerySerialization inputSerialization) /** * Get the outputSerialization property: The OutputSerialization property. - * + * * @return the outputSerialization value. */ public QuerySerialization getOutputSerialization() { @@ -112,7 +115,7 @@ public QuerySerialization getOutputSerialization() { /** * Set the outputSerialization property: The OutputSerialization property. - * + * * @param outputSerialization the outputSerialization value to set. * @return the QueryRequest object itself. */ @@ -120,4 +123,70 @@ public QueryRequest setOutputSerialization(QuerySerialization outputSerializatio this.outputSerialization = outputSerialization; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryRequest" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("QueryType", this.queryType); + xmlWriter.writeStringElement("Expression", this.expression); + xmlWriter.writeXml(this.inputSerialization, "InputSerialization"); + xmlWriter.writeXml(this.outputSerialization, "OutputSerialization"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of QueryRequest from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of QueryRequest if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the QueryRequest. + */ + public static QueryRequest fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of QueryRequest from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of QueryRequest if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the QueryRequest. + */ + public static QueryRequest fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QueryRequest" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + QueryRequest deserializedQueryRequest = new QueryRequest(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("QueryType".equals(elementName.getLocalPart())) { + deserializedQueryRequest.queryType = reader.getStringElement(); + } else if ("Expression".equals(elementName.getLocalPart())) { + deserializedQueryRequest.expression = reader.getStringElement(); + } else if ("InputSerialization".equals(elementName.getLocalPart())) { + deserializedQueryRequest.inputSerialization + = QuerySerialization.fromXml(reader, "InputSerialization"); + } else if ("OutputSerialization".equals(elementName.getLocalPart())) { + deserializedQueryRequest.outputSerialization + = QuerySerialization.fromXml(reader, "OutputSerialization"); + } else { + reader.skipElement(); + } + } + + return deserializedQueryRequest; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java index 4fe5ec4a28cc6..d1c7349590efa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java @@ -5,25 +5,33 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The QuerySerialization model. */ -@JacksonXmlRootElement(localName = "QuerySerialization") +/** + * The QuerySerialization model. + */ @Fluent -public final class QuerySerialization { +public final class QuerySerialization implements XmlSerializable { /* * The Format property. */ - @JsonProperty(value = "Format", required = true) private QueryFormat format; - /** Creates an instance of QuerySerialization class. */ - public QuerySerialization() {} + /** + * Creates an instance of QuerySerialization class. + */ + public QuerySerialization() { + } /** * Get the format property: The Format property. - * + * * @return the format value. */ public QueryFormat getFormat() { @@ -32,7 +40,7 @@ public QueryFormat getFormat() { /** * Set the format property: The Format property. - * + * * @param format the format value to set. * @return the QuerySerialization object itself. */ @@ -40,4 +48,59 @@ public QuerySerialization setFormat(QueryFormat format) { this.format = format; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QuerySerialization" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.format, "Format"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of QuerySerialization from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of QuerySerialization if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the QuerySerialization. + */ + public static QuerySerialization fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of QuerySerialization from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of QuerySerialization if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the QuerySerialization. + */ + public static QuerySerialization fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "QuerySerialization" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + QuerySerialization deserializedQuerySerialization = new QuerySerialization(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Format".equals(elementName.getLocalPart())) { + deserializedQuerySerialization.format = QueryFormat.fromXml(reader, "Format"); + } else { + reader.skipElement(); + } + } + + return deserializedQuerySerialization; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java index 46592ed652ada..54f720b742668 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ServicesFilterBlobsHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesFilterBlobsHeaders model. + */ @Fluent public final class ServicesFilterBlobsHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesFilterBlobsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -82,7 +75,7 @@ public ServicesFilterBlobsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -102,7 +95,7 @@ public ServicesFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesFilterBlobsHeaders object itself. */ @@ -122,7 +115,7 @@ public ServicesFilterBlobsHeaders setXMsClientRequestId(String xMsClientRequestI /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesFilterBlobsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java index 18af85c00e180..4f55ca4b4b4e0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java @@ -10,54 +10,46 @@ import com.azure.core.util.DateTimeRfc1123; import com.azure.storage.blob.models.AccountKind; import com.azure.storage.blob.models.SkuName; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ServicesGetAccountInfoHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesGetAccountInfoHeaders model. + */ @Fluent public final class ServicesGetAccountInfoHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-account-kind property. */ - @JsonProperty(value = "x-ms-account-kind") private AccountKind xMsAccountKind; /* * The x-ms-is-hns-enabled property. */ - @JsonProperty(value = "x-ms-is-hns-enabled") private Boolean xMsIsHnsEnabled; /* * The x-ms-sku-name property. */ - @JsonProperty(value = "x-ms-sku-name") private SkuName xMsSkuName; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -68,12 +60,10 @@ public final class ServicesGetAccountInfoHeaders { private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetAccountInfoHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { @@ -90,7 +80,7 @@ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { if (xMsSkuName != null) { this.xMsSkuName = SkuName.fromString(xMsSkuName); } - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -100,7 +90,7 @@ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -109,7 +99,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -120,7 +110,7 @@ public ServicesGetAccountInfoHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsAccountKind property: The x-ms-account-kind property. - * + * * @return the xMsAccountKind value. */ public AccountKind getXMsAccountKind() { @@ -129,7 +119,7 @@ public AccountKind getXMsAccountKind() { /** * Set the xMsAccountKind property: The x-ms-account-kind property. - * + * * @param xMsAccountKind the xMsAccountKind value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -140,7 +130,7 @@ public ServicesGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKin /** * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @return the xMsIsHnsEnabled value. */ public Boolean isXMsIsHnsEnabled() { @@ -149,7 +139,7 @@ public Boolean isXMsIsHnsEnabled() { /** * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. - * + * * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -160,7 +150,7 @@ public ServicesGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) /** * Get the xMsSkuName property: The x-ms-sku-name property. - * + * * @return the xMsSkuName value. */ public SkuName getXMsSkuName() { @@ -169,7 +159,7 @@ public SkuName getXMsSkuName() { /** * Set the xMsSkuName property: The x-ms-sku-name property. - * + * * @param xMsSkuName the xMsSkuName value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -180,7 +170,7 @@ public ServicesGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -189,7 +179,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -200,7 +190,7 @@ public ServicesGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -209,7 +199,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ @@ -220,7 +210,7 @@ public ServicesGetAccountInfoHeaders setXMsClientRequestId(String xMsClientReque /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -232,7 +222,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetAccountInfoHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java index ef2c77bfbe6f9..e8127d8a60c29 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java @@ -7,50 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** The ServicesGetPropertiesHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesGetPropertiesHeaders model. + */ @Fluent public final class ServicesGetPropertiesHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetPropertiesHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -59,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetPropertiesHeaders object itself. */ @@ -70,7 +64,7 @@ public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -79,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetPropertiesHeaders object itself. */ @@ -90,7 +84,7 @@ public ServicesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -99,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java index 4969375a7833a..6d99bb8fa3f90 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ServicesGetStatisticsHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesGetStatisticsHeaders model. + */ @Fluent public final class ServicesGetStatisticsHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetStatisticsHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -82,7 +75,7 @@ public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -102,7 +95,7 @@ public ServicesGetStatisticsHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetStatisticsHeaders object itself. */ @@ -122,7 +115,7 @@ public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientReques /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetStatisticsHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java index 6f8ee742dcc2a..9168138f5d8c6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java @@ -8,51 +8,44 @@ import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; -/** The ServicesGetUserDelegationKeyHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesGetUserDelegationKeyHeaders model. + */ @Fluent public final class ServicesGetUserDelegationKeyHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 date; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetUserDelegationKeyHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { @@ -62,7 +55,7 @@ public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -71,7 +64,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -82,7 +75,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -91,7 +84,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -102,7 +95,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsRequestId(String xMsRequestId) /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -111,7 +104,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ @@ -122,7 +115,7 @@ public ServicesGetUserDelegationKeyHeaders setXMsClientRequestId(String xMsClien /** * Get the date property: The Date property. - * + * * @return the date value. */ public OffsetDateTime getDate() { @@ -134,7 +127,7 @@ public OffsetDateTime getDate() { /** * Set the date property: The Date property. - * + * * @param date the date value to set. * @return the ServicesGetUserDelegationKeyHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentHeaders.java index d25155f7352ee..64512684350b1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentHeaders.java @@ -7,50 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** The ServicesListBlobContainersSegmentHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesListBlobContainersSegmentHeaders model. + */ @Fluent public final class ServicesListBlobContainersSegmentHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesListBlobContainersSegmentHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesListBlobContainersSegmentHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -59,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ @@ -70,7 +64,7 @@ public ServicesListBlobContainersSegmentHeaders setXMsVersion(String xMsVersion) /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -79,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ @@ -90,7 +84,7 @@ public ServicesListBlobContainersSegmentHeaders setXMsRequestId(String xMsReques /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -99,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesListBlobContainersSegmentHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextHeaders.java index c822d52d841b0..0d8f4d36c4303 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextHeaders.java @@ -7,50 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** The ServicesListBlobContainersSegmentNextHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesListBlobContainersSegmentNextHeaders model. + */ @Fluent public final class ServicesListBlobContainersSegmentNextHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesListBlobContainersSegmentNextHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesListBlobContainersSegmentNextHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -59,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ @@ -70,7 +64,7 @@ public ServicesListBlobContainersSegmentNextHeaders setXMsVersion(String xMsVers /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -79,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ @@ -90,7 +84,7 @@ public ServicesListBlobContainersSegmentNextHeaders setXMsRequestId(String xMsRe /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -99,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesListBlobContainersSegmentNextHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java index 5803d9cba2f30..8ee19e86bf647 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java @@ -7,50 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** The ServicesSetPropertiesHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesSetPropertiesHeaders model. + */ @Fluent public final class ServicesSetPropertiesHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesSetPropertiesHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesSetPropertiesHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -59,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesSetPropertiesHeaders object itself. */ @@ -70,7 +64,7 @@ public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -79,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesSetPropertiesHeaders object itself. */ @@ -90,7 +84,7 @@ public ServicesSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { /** * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @return the xMsClientRequestId value. */ public String getXMsClientRequestId() { @@ -99,7 +93,7 @@ public String getXMsClientRequestId() { /** * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * + * * @param xMsClientRequestId the xMsClientRequestId value to set. * @return the ServicesSetPropertiesHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchHeaders.java index cea476c4cef60..19f1dd224b690 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchHeaders.java @@ -7,50 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** The ServicesSubmitBatchHeaders model. */ -@JacksonXmlRootElement(localName = "null") +/** + * The ServicesSubmitBatchHeaders model. + */ @Fluent public final class ServicesSubmitBatchHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Content-Type property. */ - @JsonProperty(value = "Content-Type") private String contentType; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_ID = HttpHeaderName.fromString("x-ms-request-id"); - // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesSubmitBatchHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesSubmitBatchHeaders(HttpHeaders rawHeaders) { this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsRequestId = rawHeaders.getValue(X_MS_REQUEST_ID); + this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); } /** * Get the xMsVersion property: The x-ms-version property. - * + * * @return the xMsVersion value. */ public String getXMsVersion() { @@ -59,7 +53,7 @@ public String getXMsVersion() { /** * Set the xMsVersion property: The x-ms-version property. - * + * * @param xMsVersion the xMsVersion value to set. * @return the ServicesSubmitBatchHeaders object itself. */ @@ -70,7 +64,7 @@ public ServicesSubmitBatchHeaders setXMsVersion(String xMsVersion) { /** * Get the xMsRequestId property: The x-ms-request-id property. - * + * * @return the xMsRequestId value. */ public String getXMsRequestId() { @@ -79,7 +73,7 @@ public String getXMsRequestId() { /** * Set the xMsRequestId property: The x-ms-request-id property. - * + * * @param xMsRequestId the xMsRequestId value to set. * @return the ServicesSubmitBatchHeaders object itself. */ @@ -90,7 +84,7 @@ public ServicesSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { /** * Get the contentType property: The Content-Type property. - * + * * @return the contentType value. */ public String getContentType() { @@ -99,7 +93,7 @@ public String getContentType() { /** * Set the contentType property: The Content-Type property. - * + * * @param contentType the contentType value to set. * @return the ServicesSubmitBatchHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageError.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageError.java index 397028f1be1ae..f8d923adc5e8b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageError.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageError.java @@ -5,43 +5,48 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The StorageError model. */ -@JacksonXmlRootElement(localName = "StorageError") +/** + * The StorageError model. + */ @Fluent -public final class StorageError { +public final class StorageError implements XmlSerializable { /* * The Message property. */ - @JsonProperty(value = "Message") private String message; /* * The CopySourceStatusCode property. */ - @JsonProperty(value = "CopySourceStatusCode") private Long copySourceStatusCode; /* * The CopySourceErrorCode property. */ - @JsonProperty(value = "CopySourceErrorCode") private String copySourceErrorCode; /* * The CopySourceErrorMessage property. */ - @JsonProperty(value = "CopySourceErrorMessage") private String copySourceErrorMessage; - /** Creates an instance of StorageError class. */ - public StorageError() {} + /** + * Creates an instance of StorageError class. + */ + public StorageError() { + } /** * Get the message property: The Message property. - * + * * @return the message value. */ public String getMessage() { @@ -50,7 +55,7 @@ public String getMessage() { /** * Set the message property: The Message property. - * + * * @param message the message value to set. * @return the StorageError object itself. */ @@ -61,7 +66,7 @@ public StorageError setMessage(String message) { /** * Get the copySourceStatusCode property: The CopySourceStatusCode property. - * + * * @return the copySourceStatusCode value. */ public Long getCopySourceStatusCode() { @@ -70,7 +75,7 @@ public Long getCopySourceStatusCode() { /** * Set the copySourceStatusCode property: The CopySourceStatusCode property. - * + * * @param copySourceStatusCode the copySourceStatusCode value to set. * @return the StorageError object itself. */ @@ -81,7 +86,7 @@ public StorageError setCopySourceStatusCode(Long copySourceStatusCode) { /** * Get the copySourceErrorCode property: The CopySourceErrorCode property. - * + * * @return the copySourceErrorCode value. */ public String getCopySourceErrorCode() { @@ -90,7 +95,7 @@ public String getCopySourceErrorCode() { /** * Set the copySourceErrorCode property: The CopySourceErrorCode property. - * + * * @param copySourceErrorCode the copySourceErrorCode value to set. * @return the StorageError object itself. */ @@ -101,7 +106,7 @@ public StorageError setCopySourceErrorCode(String copySourceErrorCode) { /** * Get the copySourceErrorMessage property: The CopySourceErrorMessage property. - * + * * @return the copySourceErrorMessage value. */ public String getCopySourceErrorMessage() { @@ -110,7 +115,7 @@ public String getCopySourceErrorMessage() { /** * Set the copySourceErrorMessage property: The CopySourceErrorMessage property. - * + * * @param copySourceErrorMessage the copySourceErrorMessage value to set. * @return the StorageError object itself. */ @@ -118,4 +123,66 @@ public StorageError setCopySourceErrorMessage(String copySourceErrorMessage) { this.copySourceErrorMessage = copySourceErrorMessage; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageError" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Message", this.message); + xmlWriter.writeNumberElement("CopySourceStatusCode", this.copySourceStatusCode); + xmlWriter.writeStringElement("CopySourceErrorCode", this.copySourceErrorCode); + xmlWriter.writeStringElement("CopySourceErrorMessage", this.copySourceErrorMessage); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of StorageError from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of StorageError if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the StorageError. + */ + public static StorageError fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of StorageError from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of StorageError if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the StorageError. + */ + public static StorageError fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageError" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + StorageError deserializedStorageError = new StorageError(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Message".equals(elementName.getLocalPart())) { + deserializedStorageError.message = reader.getStringElement(); + } else if ("CopySourceStatusCode".equals(elementName.getLocalPart())) { + deserializedStorageError.copySourceStatusCode = reader.getNullableElement(Long::parseLong); + } else if ("CopySourceErrorCode".equals(elementName.getLocalPart())) { + deserializedStorageError.copySourceErrorCode = reader.getStringElement(); + } else if ("CopySourceErrorMessage".equals(elementName.getLocalPart())) { + deserializedStorageError.copySourceErrorMessage = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedStorageError; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageErrorException.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageErrorException.java index bfe878a002f65..2171fe339ef0f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageErrorException.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageErrorException.java @@ -7,11 +7,13 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpResponse; -/** Exception thrown for an invalid response with StorageError information. */ +/** + * Exception thrown for an invalid response with StorageError information. + */ public final class StorageErrorException extends HttpResponseException { /** * Initializes a new instance of the StorageErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -21,7 +23,7 @@ public StorageErrorException(String message, HttpResponse response) { /** * Initializes a new instance of the StorageErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. @@ -30,7 +32,9 @@ public StorageErrorException(String message, HttpResponse response, StorageError super(message, response, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public StorageError getValue() { return (StorageError) super.getValue(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java index 0912b99dd4180..4c7fa15a262de 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for AzureBlobStorage. null. */ +/** + * Package containing the data models for AzureBlobStorage. + * null. + */ package com.azure.storage.blob.implementation.models; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/package-info.java index 30ee9d6a31515..639d482c5fda7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for AzureBlobStorage. null. */ +/** + * Package containing the implementations for AzureBlobStorage. + * null. + */ package com.azure.storage.blob.implementation; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java index fab718a49b40a..007106aa2acb6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java @@ -5,81 +5,114 @@ package com.azure.storage.blob.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AccessTier. */ +/** + * Defines values for AccessTier. + */ public final class AccessTier extends ExpandableStringEnum { - /** Static value P4 for AccessTier. */ + /** + * Static value P4 for AccessTier. + */ public static final AccessTier P4 = fromString("P4"); - /** Static value P6 for AccessTier. */ + /** + * Static value P6 for AccessTier. + */ public static final AccessTier P6 = fromString("P6"); - /** Static value P10 for AccessTier. */ + /** + * Static value P10 for AccessTier. + */ public static final AccessTier P10 = fromString("P10"); - /** Static value P15 for AccessTier. */ + /** + * Static value P15 for AccessTier. + */ public static final AccessTier P15 = fromString("P15"); - /** Static value P20 for AccessTier. */ + /** + * Static value P20 for AccessTier. + */ public static final AccessTier P20 = fromString("P20"); - /** Static value P30 for AccessTier. */ + /** + * Static value P30 for AccessTier. + */ public static final AccessTier P30 = fromString("P30"); - /** Static value P40 for AccessTier. */ + /** + * Static value P40 for AccessTier. + */ public static final AccessTier P40 = fromString("P40"); - /** Static value P50 for AccessTier. */ + /** + * Static value P50 for AccessTier. + */ public static final AccessTier P50 = fromString("P50"); - /** Static value P60 for AccessTier. */ + /** + * Static value P60 for AccessTier. + */ public static final AccessTier P60 = fromString("P60"); - /** Static value P70 for AccessTier. */ + /** + * Static value P70 for AccessTier. + */ public static final AccessTier P70 = fromString("P70"); - /** Static value P80 for AccessTier. */ + /** + * Static value P80 for AccessTier. + */ public static final AccessTier P80 = fromString("P80"); - /** Static value Hot for AccessTier. */ + /** + * Static value Hot for AccessTier. + */ public static final AccessTier HOT = fromString("Hot"); - /** Static value Cool for AccessTier. */ + /** + * Static value Cool for AccessTier. + */ public static final AccessTier COOL = fromString("Cool"); - /** Static value Archive for AccessTier. */ + /** + * Static value Archive for AccessTier. + */ public static final AccessTier ARCHIVE = fromString("Archive"); - /** Static value Premium for AccessTier. */ + /** + * Static value Premium for AccessTier. + */ public static final AccessTier PREMIUM = fromString("Premium"); - /** Static value Cold for AccessTier. */ + /** + * Static value Cold for AccessTier. + */ public static final AccessTier COLD = fromString("Cold"); /** * Creates a new instance of AccessTier value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public AccessTier() {} + public AccessTier() { + } /** * Creates or finds a AccessTier from its string representation. - * + * * @param name a name to look for. * @return the corresponding AccessTier. */ - @JsonCreator public static AccessTier fromString(String name) { return fromString(name, AccessTier.class); } /** * Gets known AccessTier values. - * + * * @return known AccessTier values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java index c0f25fa9f26fe..4223a28e59a07 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccountKind.java @@ -4,27 +4,38 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for AccountKind. */ +/** + * Defines values for AccountKind. + */ public enum AccountKind { - /** Enum value Storage. */ + /** + * Enum value Storage. + */ STORAGE("Storage"), - /** Enum value BlobStorage. */ + /** + * Enum value BlobStorage. + */ BLOB_STORAGE("BlobStorage"), - /** Enum value StorageV2. */ + /** + * Enum value StorageV2. + */ STORAGE_V2("StorageV2"), - /** Enum value FileStorage. */ + /** + * Enum value FileStorage. + */ FILE_STORAGE("FileStorage"), - /** Enum value BlockBlobStorage. */ + /** + * Enum value BlockBlobStorage. + */ BLOCK_BLOB_STORAGE("BlockBlobStorage"); - /** The actual serialized value for a AccountKind instance. */ + /** + * The actual serialized value for a AccountKind instance. + */ private final String value; AccountKind(String value) { @@ -33,11 +44,10 @@ public enum AccountKind { /** * Parses a serialized value to a AccountKind instance. - * + * * @param value the serialized value to parse. * @return the parsed AccountKind object, or null if unable to parse. */ - @JsonCreator public static AccountKind fromString(String value) { if (value == null) { return null; @@ -51,8 +61,9 @@ public static AccountKind fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java index 17d06bb940c72..05aee8f998c8d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java @@ -5,42 +5,49 @@ package com.azure.storage.blob.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ArchiveStatus. */ +/** + * Defines values for ArchiveStatus. + */ public final class ArchiveStatus extends ExpandableStringEnum { - /** Static value rehydrate-pending-to-hot for ArchiveStatus. */ + /** + * Static value rehydrate-pending-to-hot for ArchiveStatus. + */ public static final ArchiveStatus REHYDRATE_PENDING_TO_HOT = fromString("rehydrate-pending-to-hot"); - /** Static value rehydrate-pending-to-cool for ArchiveStatus. */ + /** + * Static value rehydrate-pending-to-cool for ArchiveStatus. + */ public static final ArchiveStatus REHYDRATE_PENDING_TO_COOL = fromString("rehydrate-pending-to-cool"); - /** Static value rehydrate-pending-to-cold for ArchiveStatus. */ + /** + * Static value rehydrate-pending-to-cold for ArchiveStatus. + */ public static final ArchiveStatus REHYDRATE_PENDING_TO_COLD = fromString("rehydrate-pending-to-cold"); /** * Creates a new instance of ArchiveStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public ArchiveStatus() {} + public ArchiveStatus() { + } /** * Creates or finds a ArchiveStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ArchiveStatus. */ - @JsonCreator public static ArchiveStatus fromString(String name) { return fromString(name, ArchiveStatus.class); } /** * Gets known ArchiveStatus values. - * + * * @return known ArchiveStatus values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java index 140fbc51a9c3b..0794ef4fe0fe4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java @@ -1,42 +1,49 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** An Access policy. */ -@JacksonXmlRootElement(localName = "AccessPolicy") +/** + * An Access policy. + */ @Fluent -public final class BlobAccessPolicy { - +public final class BlobAccessPolicy implements XmlSerializable { /* * the date-time the policy is active */ - @JsonProperty(value = "Start") private OffsetDateTime startsOn; /* * the date-time the policy expires */ - @JsonProperty(value = "Expiry") private OffsetDateTime expiresOn; /* * the permissions for the acl policy */ - @JsonProperty(value = "Permission") private String permissions; - /** Creates an instance of BlobAccessPolicy class. */ - public BlobAccessPolicy() {} + /** + * Creates an instance of BlobAccessPolicy class. + */ + public BlobAccessPolicy() { + } /** * Get the startsOn property: the date-time the policy is active. - * + * * @return the startsOn value. */ public OffsetDateTime getStartsOn() { @@ -45,7 +52,7 @@ public OffsetDateTime getStartsOn() { /** * Set the startsOn property: the date-time the policy is active. - * + * * @param startsOn the startsOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -56,7 +63,7 @@ public BlobAccessPolicy setStartsOn(OffsetDateTime startsOn) { /** * Get the expiresOn property: the date-time the policy expires. - * + * * @return the expiresOn value. */ public OffsetDateTime getExpiresOn() { @@ -65,7 +72,7 @@ public OffsetDateTime getExpiresOn() { /** * Set the expiresOn property: the date-time the policy expires. - * + * * @param expiresOn the expiresOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -76,7 +83,7 @@ public BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn) { /** * Get the permissions property: the permissions for the acl policy. - * + * * @return the permissions value. */ public String getPermissions() { @@ -85,7 +92,7 @@ public String getPermissions() { /** * Set the permissions property: the permissions for the acl policy. - * + * * @param permissions the permissions value to set. * @return the BlobAccessPolicy object itself. */ @@ -93,4 +100,67 @@ public BlobAccessPolicy setPermissions(String permissions) { this.permissions = permissions; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAccessPolicy" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Start", + this.startsOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startsOn)); + xmlWriter.writeStringElement("Expiry", + this.expiresOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiresOn)); + xmlWriter.writeStringElement("Permission", this.permissions); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobAccessPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobAccessPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobAccessPolicy. + */ + public static BlobAccessPolicy fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobAccessPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobAccessPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobAccessPolicy. + */ + public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAccessPolicy" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobAccessPolicy deserializedBlobAccessPolicy = new BlobAccessPolicy(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedBlobAccessPolicy.startsOn + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); + } else if ("Expiry".equals(elementName.getLocalPart())) { + deserializedBlobAccessPolicy.expiresOn + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); + } else if ("Permission".equals(elementName.getLocalPart())) { + deserializedBlobAccessPolicy.permissions = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlobAccessPolicy; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java index 294fda7344846..49ad321f27c58 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java @@ -1,53 +1,57 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** Azure Analytics Logging settings. */ -@JacksonXmlRootElement(localName = "Logging") +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + +/** + * Azure Analytics Logging settings. + */ @Fluent -public final class BlobAnalyticsLogging { - +public final class BlobAnalyticsLogging implements XmlSerializable { /* * The version of Storage Analytics to configure. */ - @JsonProperty(value = "Version", required = true) private String version; /* * Indicates whether all delete requests should be logged. */ - @JsonProperty(value = "Delete", required = true) private boolean delete; /* * Indicates whether all read requests should be logged. */ - @JsonProperty(value = "Read", required = true) private boolean read; /* * Indicates whether all write requests should be logged. */ - @JsonProperty(value = "Write", required = true) private boolean write; /* * the retention policy which determines how long the associated data should persist */ - @JsonProperty(value = "RetentionPolicy", required = true) private BlobRetentionPolicy retentionPolicy; - /** Creates an instance of BlobAnalyticsLogging class. */ - public BlobAnalyticsLogging() {} + /** + * Creates an instance of BlobAnalyticsLogging class. + */ + public BlobAnalyticsLogging() { + } /** * Get the version property: The version of Storage Analytics to configure. - * + * * @return the version value. */ public String getVersion() { @@ -56,7 +60,7 @@ public String getVersion() { /** * Set the version property: The version of Storage Analytics to configure. - * + * * @param version the version value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -67,7 +71,7 @@ public BlobAnalyticsLogging setVersion(String version) { /** * Get the delete property: Indicates whether all delete requests should be logged. - * + * * @return the delete value. */ public boolean isDelete() { @@ -76,7 +80,7 @@ public boolean isDelete() { /** * Set the delete property: Indicates whether all delete requests should be logged. - * + * * @param delete the delete value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -87,7 +91,7 @@ public BlobAnalyticsLogging setDelete(boolean delete) { /** * Get the read property: Indicates whether all read requests should be logged. - * + * * @return the read value. */ public boolean isRead() { @@ -96,7 +100,7 @@ public boolean isRead() { /** * Set the read property: Indicates whether all read requests should be logged. - * + * * @param read the read value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -107,7 +111,7 @@ public BlobAnalyticsLogging setRead(boolean read) { /** * Get the write property: Indicates whether all write requests should be logged. - * + * * @return the write value. */ public boolean isWrite() { @@ -116,7 +120,7 @@ public boolean isWrite() { /** * Set the write property: Indicates whether all write requests should be logged. - * + * * @param write the write value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -128,7 +132,7 @@ public BlobAnalyticsLogging setWrite(boolean write) { /** * Get the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the retentionPolicy value. */ public BlobRetentionPolicy getRetentionPolicy() { @@ -138,7 +142,7 @@ public BlobRetentionPolicy getRetentionPolicy() { /** * Set the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -146,4 +150,73 @@ public BlobAnalyticsLogging setRetentionPolicy(BlobRetentionPolicy retentionPoli this.retentionPolicy = retentionPolicy; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAnalyticsLogging" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Version", this.version); + xmlWriter.writeBooleanElement("Delete", this.delete); + xmlWriter.writeBooleanElement("Read", this.read); + xmlWriter.writeBooleanElement("Write", this.write); + xmlWriter.writeXml(this.retentionPolicy, "RetentionPolicy"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobAnalyticsLogging from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobAnalyticsLogging if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobAnalyticsLogging. + */ + public static BlobAnalyticsLogging fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobAnalyticsLogging from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobAnalyticsLogging if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobAnalyticsLogging. + */ + public static BlobAnalyticsLogging fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobAnalyticsLogging" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobAnalyticsLogging deserializedBlobAnalyticsLogging = new BlobAnalyticsLogging(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Version".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.version = reader.getStringElement(); + } else if ("Delete".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.delete = reader.getBooleanElement(); + } else if ("Read".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.read = reader.getBooleanElement(); + } else if ("Write".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.write = reader.getBooleanElement(); + } else if ("RetentionPolicy".equals(elementName.getLocalPart())) { + deserializedBlobAnalyticsLogging.retentionPolicy + = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobAnalyticsLogging; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java index 4c4065ff9cc97..f5da228e74fe9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerEncryptionScope.java @@ -1,38 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** Parameter group. */ -@JacksonXmlRootElement(localName = "blob-container-encryption-scope") +/** + * Parameter group. + */ @Fluent public final class BlobContainerEncryptionScope { - /* - * Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use - * for all future writes. + * Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use for all future writes. */ - @JsonProperty(value = "DefaultEncryptionScope") private String defaultEncryptionScope; /* - * Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a different encryption - * scope than the scope set on the container. + * Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a different encryption scope than the scope set on the container. */ - @JsonProperty(value = "EncryptionScopeOverridePrevented") private Boolean encryptionScopeOverridePrevented; - /** Creates an instance of BlobContainerEncryptionScope class. */ - public BlobContainerEncryptionScope() {} + /** + * Creates an instance of BlobContainerEncryptionScope class. + */ + public BlobContainerEncryptionScope() { + } /** * Get the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption * scope to set on the container and use for all future writes. - * + * * @return the defaultEncryptionScope value. */ public String getDefaultEncryptionScope() { @@ -42,7 +40,7 @@ public String getDefaultEncryptionScope() { /** * Set the defaultEncryptionScope property: Optional. Version 2019-07-07 and later. Specifies the default encryption * scope to set on the container and use for all future writes. - * + * * @param defaultEncryptionScope the defaultEncryptionScope value to set. * @return the BlobContainerEncryptionScope object itself. */ @@ -54,7 +52,7 @@ public BlobContainerEncryptionScope setDefaultEncryptionScope(String defaultEncr /** * Get the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any * request from specifying a different encryption scope than the scope set on the container. - * + * * @return the encryptionScopeOverridePrevented value. */ public boolean isEncryptionScopeOverridePrevented() { @@ -65,7 +63,7 @@ public boolean isEncryptionScopeOverridePrevented() { /** * Set the encryptionScopeOverridePrevented property: Optional. Version 2019-07-07 and newer. If true, prevents any * request from specifying a different encryption scope than the scope set on the container. - * + * * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. * @return the BlobContainerEncryptionScope object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java index 4600554516df6..246f18118fc71 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItem.java @@ -5,50 +5,55 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import java.util.LinkedHashMap; import java.util.Map; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** An Azure Storage container. */ -@JacksonXmlRootElement(localName = "Container") +/** + * An Azure Storage container. + */ @Fluent -public final class BlobContainerItem { +public final class BlobContainerItem implements XmlSerializable { /* * The Name property. */ - @JsonProperty(value = "Name", required = true) private String name; /* * The Deleted property. */ - @JsonProperty(value = "Deleted") private Boolean deleted; /* * The Version property. */ - @JsonProperty(value = "Version") private String version; /* * Properties of a container */ - @JsonProperty(value = "Properties", required = true) private BlobContainerItemProperties properties; /* * Dictionary of */ - @JsonProperty(value = "Metadata") private Map metadata; - /** Creates an instance of BlobContainerItem class. */ - public BlobContainerItem() {} + /** + * Creates an instance of BlobContainerItem class. + */ + public BlobContainerItem() { + } /** * Get the name property: The Name property. - * + * * @return the name value. */ public String getName() { @@ -57,7 +62,7 @@ public String getName() { /** * Set the name property: The Name property. - * + * * @param name the name value to set. * @return the BlobContainerItem object itself. */ @@ -68,7 +73,7 @@ public BlobContainerItem setName(String name) { /** * Get the deleted property: The Deleted property. - * + * * @return the deleted value. */ public Boolean isDeleted() { @@ -77,7 +82,7 @@ public Boolean isDeleted() { /** * Set the deleted property: The Deleted property. - * + * * @param deleted the deleted value to set. * @return the BlobContainerItem object itself. */ @@ -88,7 +93,7 @@ public BlobContainerItem setDeleted(Boolean deleted) { /** * Get the version property: The Version property. - * + * * @return the version value. */ public String getVersion() { @@ -97,7 +102,7 @@ public String getVersion() { /** * Set the version property: The Version property. - * + * * @param version the version value to set. * @return the BlobContainerItem object itself. */ @@ -108,7 +113,7 @@ public BlobContainerItem setVersion(String version) { /** * Get the properties property: Properties of a container. - * + * * @return the properties value. */ public BlobContainerItemProperties getProperties() { @@ -117,7 +122,7 @@ public BlobContainerItemProperties getProperties() { /** * Set the properties property: Properties of a container. - * + * * @param properties the properties value to set. * @return the BlobContainerItem object itself. */ @@ -128,7 +133,7 @@ public BlobContainerItem setProperties(BlobContainerItemProperties properties) { /** * Get the metadata property: Dictionary of <string>. - * + * * @return the metadata value. */ public Map getMetadata() { @@ -137,7 +142,7 @@ public Map getMetadata() { /** * Set the metadata property: Dictionary of <string>. - * + * * @param metadata the metadata value to set. * @return the BlobContainerItem object itself. */ @@ -145,4 +150,84 @@ public BlobContainerItem setMetadata(Map metadata) { this.metadata = metadata; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Container" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeBooleanElement("Deleted", this.deleted); + xmlWriter.writeStringElement("Version", this.version); + xmlWriter.writeXml(this.properties, "Properties"); + if (this.metadata != null) { + xmlWriter.writeStartElement("Metadata"); + for (Map.Entry entry : this.metadata.entrySet()) { + xmlWriter.writeStringElement(entry.getKey(), entry.getValue()); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobContainerItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobContainerItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItem. + */ + public static BlobContainerItem fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobContainerItem from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobContainerItem if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItem. + */ + public static BlobContainerItem fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Container" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobContainerItem deserializedBlobContainerItem = new BlobContainerItem(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.name = reader.getStringElement(); + } else if ("Deleted".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.deleted = reader.getNullableElement(Boolean::parseBoolean); + } else if ("Version".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.version = reader.getStringElement(); + } else if ("Properties".equals(elementName.getLocalPart())) { + deserializedBlobContainerItem.properties + = BlobContainerItemProperties.fromXml(reader, "Properties"); + } else if ("Metadata".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + if (deserializedBlobContainerItem.metadata == null) { + deserializedBlobContainerItem.metadata = new LinkedHashMap<>(); + } + deserializedBlobContainerItem.metadata.put(reader.getElementName().getLocalPart(), + reader.getStringElement()); + } + } else { + reader.skipElement(); + } + } + + return deserializedBlobContainerItem; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java index 85f0cbba07df7..415a6336d6970 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java @@ -4,100 +4,99 @@ package com.azure.storage.blob.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; +import java.util.Objects; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Properties of a container. */ -@JacksonXmlRootElement(localName = "BlobContainerItemProperties") +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; + +/** + * Properties of a container. + */ @Fluent -public final class BlobContainerItemProperties { +public final class BlobContainerItemProperties implements XmlSerializable { /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified", required = true) private DateTimeRfc1123 lastModified; /* * The Etag property. */ - @JsonProperty(value = "Etag", required = true) private String eTag; /* * The LeaseStatus property. */ - @JsonProperty(value = "LeaseStatus") private LeaseStatusType leaseStatus; /* * The LeaseState property. */ - @JsonProperty(value = "LeaseState") private LeaseStateType leaseState; /* * The LeaseDuration property. */ - @JsonProperty(value = "LeaseDuration") private LeaseDurationType leaseDuration; /* * The PublicAccess property. */ - @JsonProperty(value = "PublicAccess") private PublicAccessType publicAccess; /* * The HasImmutabilityPolicy property. */ - @JsonProperty(value = "HasImmutabilityPolicy") private Boolean hasImmutabilityPolicy; /* * The HasLegalHold property. */ - @JsonProperty(value = "HasLegalHold") private Boolean hasLegalHold; /* * The DefaultEncryptionScope property. */ - @JsonProperty(value = "DefaultEncryptionScope") private String defaultEncryptionScope; /* * The DenyEncryptionScopeOverride property. */ - @JsonProperty(value = "DenyEncryptionScopeOverride") private Boolean encryptionScopeOverridePrevented; /* * The DeletedTime property. */ - @JsonProperty(value = "DeletedTime") private DateTimeRfc1123 deletedTime; /* * The RemainingRetentionDays property. */ - @JsonProperty(value = "RemainingRetentionDays") private Integer remainingRetentionDays; /* * Indicates if version level worm is enabled on this container. */ - @JsonProperty(value = "ImmutableStorageWithVersioningEnabled") private Boolean isImmutableStorageWithVersioningEnabled; - /** Creates an instance of BlobContainerItemProperties class. */ - public BlobContainerItemProperties() {} + /** + * Creates an instance of BlobContainerItemProperties class. + */ + public BlobContainerItemProperties() { + } /** * Get the lastModified property: The Last-Modified property. - * + * * @return the lastModified value. */ public OffsetDateTime getLastModified() { @@ -109,7 +108,7 @@ public OffsetDateTime getLastModified() { /** * Set the lastModified property: The Last-Modified property. - * + * * @param lastModified the lastModified value to set. * @return the BlobContainerItemProperties object itself. */ @@ -124,7 +123,7 @@ public BlobContainerItemProperties setLastModified(OffsetDateTime lastModified) /** * Get the eTag property: The Etag property. - * + * * @return the eTag value. */ public String getETag() { @@ -133,7 +132,7 @@ public String getETag() { /** * Set the eTag property: The Etag property. - * + * * @param eTag the eTag value to set. * @return the BlobContainerItemProperties object itself. */ @@ -144,7 +143,7 @@ public BlobContainerItemProperties setETag(String eTag) { /** * Get the leaseStatus property: The LeaseStatus property. - * + * * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { @@ -153,7 +152,7 @@ public LeaseStatusType getLeaseStatus() { /** * Set the leaseStatus property: The LeaseStatus property. - * + * * @param leaseStatus the leaseStatus value to set. * @return the BlobContainerItemProperties object itself. */ @@ -164,7 +163,7 @@ public BlobContainerItemProperties setLeaseStatus(LeaseStatusType leaseStatus) { /** * Get the leaseState property: The LeaseState property. - * + * * @return the leaseState value. */ public LeaseStateType getLeaseState() { @@ -173,7 +172,7 @@ public LeaseStateType getLeaseState() { /** * Set the leaseState property: The LeaseState property. - * + * * @param leaseState the leaseState value to set. * @return the BlobContainerItemProperties object itself. */ @@ -184,7 +183,7 @@ public BlobContainerItemProperties setLeaseState(LeaseStateType leaseState) { /** * Get the leaseDuration property: The LeaseDuration property. - * + * * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { @@ -193,7 +192,7 @@ public LeaseDurationType getLeaseDuration() { /** * Set the leaseDuration property: The LeaseDuration property. - * + * * @param leaseDuration the leaseDuration value to set. * @return the BlobContainerItemProperties object itself. */ @@ -204,7 +203,7 @@ public BlobContainerItemProperties setLeaseDuration(LeaseDurationType leaseDurat /** * Get the publicAccess property: The PublicAccess property. - * + * * @return the publicAccess value. */ public PublicAccessType getPublicAccess() { @@ -213,7 +212,7 @@ public PublicAccessType getPublicAccess() { /** * Set the publicAccess property: The PublicAccess property. - * + * * @param publicAccess the publicAccess value to set. * @return the BlobContainerItemProperties object itself. */ @@ -224,7 +223,7 @@ public BlobContainerItemProperties setPublicAccess(PublicAccessType publicAccess /** * Get the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. - * + * * @return the hasImmutabilityPolicy value. */ public Boolean isHasImmutabilityPolicy() { @@ -233,7 +232,7 @@ public Boolean isHasImmutabilityPolicy() { /** * Set the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. - * + * * @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set. * @return the BlobContainerItemProperties object itself. */ @@ -244,7 +243,7 @@ public BlobContainerItemProperties setHasImmutabilityPolicy(Boolean hasImmutabil /** * Get the hasLegalHold property: The HasLegalHold property. - * + * * @return the hasLegalHold value. */ public Boolean isHasLegalHold() { @@ -253,7 +252,7 @@ public Boolean isHasLegalHold() { /** * Set the hasLegalHold property: The HasLegalHold property. - * + * * @param hasLegalHold the hasLegalHold value to set. * @return the BlobContainerItemProperties object itself. */ @@ -264,7 +263,7 @@ public BlobContainerItemProperties setHasLegalHold(Boolean hasLegalHold) { /** * Get the defaultEncryptionScope property: The DefaultEncryptionScope property. - * + * * @return the defaultEncryptionScope value. */ public String getDefaultEncryptionScope() { @@ -273,7 +272,7 @@ public String getDefaultEncryptionScope() { /** * Set the defaultEncryptionScope property: The DefaultEncryptionScope property. - * + * * @param defaultEncryptionScope the defaultEncryptionScope value to set. * @return the BlobContainerItemProperties object itself. */ @@ -284,7 +283,7 @@ public BlobContainerItemProperties setDefaultEncryptionScope(String defaultEncry /** * Get the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. - * + * * @return the encryptionScopeOverridePrevented value. */ public boolean isEncryptionScopeOverridePrevented() { @@ -294,7 +293,7 @@ public boolean isEncryptionScopeOverridePrevented() { /** * Set the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. - * + * * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. * @return the BlobContainerItemProperties object itself. */ @@ -305,7 +304,7 @@ public BlobContainerItemProperties setEncryptionScopeOverridePrevented(boolean e /** * Get the deletedTime property: The DeletedTime property. - * + * * @return the deletedTime value. */ public OffsetDateTime getDeletedTime() { @@ -317,7 +316,7 @@ public OffsetDateTime getDeletedTime() { /** * Set the deletedTime property: The DeletedTime property. - * + * * @param deletedTime the deletedTime value to set. * @return the BlobContainerItemProperties object itself. */ @@ -332,7 +331,7 @@ public BlobContainerItemProperties setDeletedTime(OffsetDateTime deletedTime) { /** * Get the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @return the remainingRetentionDays value. */ public Integer getRemainingRetentionDays() { @@ -341,7 +340,7 @@ public Integer getRemainingRetentionDays() { /** * Set the remainingRetentionDays property: The RemainingRetentionDays property. - * + * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobContainerItemProperties object itself. */ @@ -353,7 +352,7 @@ public BlobContainerItemProperties setRemainingRetentionDays(Integer remainingRe /** * Get the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this * container. - * + * * @return the isImmutableStorageWithVersioningEnabled value. */ public Boolean isImmutableStorageWithVersioningEnabled() { @@ -363,13 +362,119 @@ public Boolean isImmutableStorageWithVersioningEnabled() { /** * Set the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this * container. - * + * * @param isImmutableStorageWithVersioningEnabled the isImmutableStorageWithVersioningEnabled value to set. * @return the BlobContainerItemProperties object itself. */ - public BlobContainerItemProperties setImmutableStorageWithVersioningEnabled( - Boolean isImmutableStorageWithVersioningEnabled) { + public BlobContainerItemProperties + setImmutableStorageWithVersioningEnabled(Boolean isImmutableStorageWithVersioningEnabled) { this.isImmutableStorageWithVersioningEnabled = isImmutableStorageWithVersioningEnabled; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobContainerItemProperties" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Last-Modified", Objects.toString(this.lastModified, null)); + xmlWriter.writeStringElement("Etag", this.eTag); + xmlWriter.writeStringElement("LeaseStatus", this.leaseStatus == null ? null : this.leaseStatus.toString()); + xmlWriter.writeStringElement("LeaseState", this.leaseState == null ? null : this.leaseState.toString()); + xmlWriter.writeStringElement("LeaseDuration", + this.leaseDuration == null ? null : this.leaseDuration.toString()); + xmlWriter.writeStringElement("PublicAccess", this.publicAccess == null ? null : this.publicAccess.toString()); + xmlWriter.writeBooleanElement("HasImmutabilityPolicy", this.hasImmutabilityPolicy); + xmlWriter.writeBooleanElement("HasLegalHold", this.hasLegalHold); + xmlWriter.writeStringElement("DefaultEncryptionScope", this.defaultEncryptionScope); + xmlWriter.writeBooleanElement("DenyEncryptionScopeOverride", this.encryptionScopeOverridePrevented); + xmlWriter.writeStringElement("DeletedTime", Objects.toString(this.deletedTime, null)); + xmlWriter.writeNumberElement("RemainingRetentionDays", this.remainingRetentionDays); + xmlWriter.writeBooleanElement("ImmutableStorageWithVersioningEnabled", + this.isImmutableStorageWithVersioningEnabled); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobContainerItemProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobContainerItemProperties if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItemProperties. + */ + public static BlobContainerItemProperties fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobContainerItemProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobContainerItemProperties if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobContainerItemProperties. + */ + public static BlobContainerItemProperties fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobContainerItemProperties" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobContainerItemProperties deserializedBlobContainerItemProperties = new BlobContainerItemProperties(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Last-Modified".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.lastModified + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("Etag".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.eTag = reader.getStringElement(); + } else if ("LeaseStatus".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.leaseStatus + = LeaseStatusType.fromString(reader.getStringElement()); + } else if ("LeaseState".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.leaseState + = LeaseStateType.fromString(reader.getStringElement()); + } else if ("LeaseDuration".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.leaseDuration + = LeaseDurationType.fromString(reader.getStringElement()); + } else if ("PublicAccess".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.publicAccess + = PublicAccessType.fromString(reader.getStringElement()); + } else if ("HasImmutabilityPolicy".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.hasImmutabilityPolicy + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("HasLegalHold".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.hasLegalHold + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("DefaultEncryptionScope".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.defaultEncryptionScope = reader.getStringElement(); + } else if ("DenyEncryptionScopeOverride".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.encryptionScopeOverridePrevented + = reader.getNullableElement(Boolean::parseBoolean); + } else if ("DeletedTime".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.deletedTime + = reader.getNullableElement(DateTimeRfc1123::new); + } else if ("RemainingRetentionDays".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.remainingRetentionDays + = reader.getNullableElement(Integer::parseInt); + } else if ("ImmutableStorageWithVersioningEnabled".equals(elementName.getLocalPart())) { + deserializedBlobContainerItemProperties.isImmutableStorageWithVersioningEnabled + = reader.getNullableElement(Boolean::parseBoolean); + } else { + reader.skipElement(); + } + } + + return deserializedBlobContainerItemProperties; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java index 7760d35e7218f..dee472e694769 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCopySourceTagsMode.java @@ -5,39 +5,44 @@ package com.azure.storage.blob.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BlobCopySourceTagsMode. */ +/** + * Defines values for BlobCopySourceTagsMode. + */ public final class BlobCopySourceTagsMode extends ExpandableStringEnum { - /** Static value REPLACE for BlobCopySourceTagsMode. */ + /** + * Static value REPLACE for BlobCopySourceTagsMode. + */ public static final BlobCopySourceTagsMode REPLACE = fromString("REPLACE"); - /** Static value COPY for BlobCopySourceTagsMode. */ + /** + * Static value COPY for BlobCopySourceTagsMode. + */ public static final BlobCopySourceTagsMode COPY = fromString("COPY"); /** * Creates a new instance of BlobCopySourceTagsMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public BlobCopySourceTagsMode() {} + public BlobCopySourceTagsMode() { + } /** * Creates or finds a BlobCopySourceTagsMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding BlobCopySourceTagsMode. */ - @JsonCreator public static BlobCopySourceTagsMode fromString(String name) { return fromString(name, BlobCopySourceTagsMode.class); } /** * Gets known BlobCopySourceTagsMode values. - * + * * @return known BlobCopySourceTagsMode values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java index d0772b19bedd2..b1f526e3172eb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobCorsRule.java @@ -5,8 +5,13 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** * CORS is an HTTP feature that enables a web application running under one domain to access resources in another @@ -14,52 +19,45 @@ * calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs * in another domain. */ -@JacksonXmlRootElement(localName = "CorsRule") @Fluent -public final class BlobCorsRule { +public final class BlobCorsRule implements XmlSerializable { /* - * The origin domains that are permitted to make a request against the storage service via CORS. The origin domain - * is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with - * the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all - * origin domains to make requests via CORS. + * The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS. */ - @JsonProperty(value = "AllowedOrigins", required = true) private String allowedOrigins; /* * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) */ - @JsonProperty(value = "AllowedMethods", required = true) private String allowedMethods; /* * the request headers that the origin domain may specify on the CORS request. */ - @JsonProperty(value = "AllowedHeaders", required = true) private String allowedHeaders; /* - * The response headers that may be sent in the response to the CORS request and exposed by the browser to the - * request issuer + * The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer */ - @JsonProperty(value = "ExposedHeaders", required = true) private String exposedHeaders; /* * The maximum amount time that a browser should cache the preflight OPTIONS request. */ - @JsonProperty(value = "MaxAgeInSeconds", required = true) private int maxAgeInSeconds; - /** Creates an instance of BlobCorsRule class. */ - public BlobCorsRule() {} + /** + * Creates an instance of BlobCorsRule class. + */ + public BlobCorsRule() { + } /** * Get the allowedOrigins property: The origin domains that are permitted to make a request against the storage * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the * wildcard character '*' to allow all origin domains to make requests via CORS. - * + * * @return the allowedOrigins value. */ public String getAllowedOrigins() { @@ -71,7 +69,7 @@ public String getAllowedOrigins() { * service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be * an exact case-sensitive match with the origin that the user age sends to the service. You can also use the * wildcard character '*' to allow all origin domains to make requests via CORS. - * + * * @param allowedOrigins the allowedOrigins value to set. * @return the BlobCorsRule object itself. */ @@ -83,7 +81,7 @@ public BlobCorsRule setAllowedOrigins(String allowedOrigins) { /** * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS * request. (comma separated). - * + * * @return the allowedMethods value. */ public String getAllowedMethods() { @@ -93,7 +91,7 @@ public String getAllowedMethods() { /** * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS * request. (comma separated). - * + * * @param allowedMethods the allowedMethods value to set. * @return the BlobCorsRule object itself. */ @@ -104,7 +102,7 @@ public BlobCorsRule setAllowedMethods(String allowedMethods) { /** * Get the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * * @return the allowedHeaders value. */ public String getAllowedHeaders() { @@ -113,7 +111,7 @@ public String getAllowedHeaders() { /** * Set the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * * @param allowedHeaders the allowedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -125,7 +123,7 @@ public BlobCorsRule setAllowedHeaders(String allowedHeaders) { /** * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and * exposed by the browser to the request issuer. - * + * * @return the exposedHeaders value. */ public String getExposedHeaders() { @@ -135,7 +133,7 @@ public String getExposedHeaders() { /** * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and * exposed by the browser to the request issuer. - * + * * @param exposedHeaders the exposedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -147,7 +145,7 @@ public BlobCorsRule setExposedHeaders(String exposedHeaders) { /** * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS * request. - * + * * @return the maxAgeInSeconds value. */ public int getMaxAgeInSeconds() { @@ -157,7 +155,7 @@ public int getMaxAgeInSeconds() { /** * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS * request. - * + * * @param maxAgeInSeconds the maxAgeInSeconds value to set. * @return the BlobCorsRule object itself. */ @@ -165,4 +163,71 @@ public BlobCorsRule setMaxAgeInSeconds(int maxAgeInSeconds) { this.maxAgeInSeconds = maxAgeInSeconds; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "CorsRule" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("AllowedOrigins", this.allowedOrigins); + xmlWriter.writeStringElement("AllowedMethods", this.allowedMethods); + xmlWriter.writeStringElement("AllowedHeaders", this.allowedHeaders); + xmlWriter.writeStringElement("ExposedHeaders", this.exposedHeaders); + xmlWriter.writeIntElement("MaxAgeInSeconds", this.maxAgeInSeconds); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobCorsRule from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobCorsRule if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobCorsRule. + */ + public static BlobCorsRule fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobCorsRule from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobCorsRule if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobCorsRule. + */ + public static BlobCorsRule fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "CorsRule" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobCorsRule deserializedBlobCorsRule = new BlobCorsRule(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("AllowedOrigins".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.allowedOrigins = reader.getStringElement(); + } else if ("AllowedMethods".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.allowedMethods = reader.getStringElement(); + } else if ("AllowedHeaders".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.allowedHeaders = reader.getStringElement(); + } else if ("ExposedHeaders".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.exposedHeaders = reader.getStringElement(); + } else if ("MaxAgeInSeconds".equals(elementName.getLocalPart())) { + deserializedBlobCorsRule.maxAgeInSeconds = reader.getIntElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlobCorsRule; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java index 11cfc6f344128..c091eada57a85 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobErrorCode.java @@ -4,374 +4,602 @@ package com.azure.storage.blob.models; -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Error codes returned by the service. */ +import com.azure.core.util.ExpandableStringEnum; + +/** + * Error codes returned by the service. + */ public final class BlobErrorCode extends ExpandableStringEnum { - /** Static value AccountAlreadyExists for BlobErrorCode. */ + /** + * Static value AccountAlreadyExists for BlobErrorCode. + */ public static final BlobErrorCode ACCOUNT_ALREADY_EXISTS = fromString("AccountAlreadyExists"); - /** Static value AccountBeingCreated for BlobErrorCode. */ + /** + * Static value AccountBeingCreated for BlobErrorCode. + */ public static final BlobErrorCode ACCOUNT_BEING_CREATED = fromString("AccountBeingCreated"); - /** Static value AccountIsDisabled for BlobErrorCode. */ + /** + * Static value AccountIsDisabled for BlobErrorCode. + */ public static final BlobErrorCode ACCOUNT_IS_DISABLED = fromString("AccountIsDisabled"); - /** Static value AuthenticationFailed for BlobErrorCode. */ + /** + * Static value AuthenticationFailed for BlobErrorCode. + */ public static final BlobErrorCode AUTHENTICATION_FAILED = fromString("AuthenticationFailed"); - /** Static value AuthorizationFailure for BlobErrorCode. */ + /** + * Static value AuthorizationFailure for BlobErrorCode. + */ public static final BlobErrorCode AUTHORIZATION_FAILURE = fromString("AuthorizationFailure"); - /** Static value ConditionHeadersNotSupported for BlobErrorCode. */ + /** + * Static value ConditionHeadersNotSupported for BlobErrorCode. + */ public static final BlobErrorCode CONDITION_HEADERS_NOT_SUPPORTED = fromString("ConditionHeadersNotSupported"); - /** Static value ConditionNotMet for BlobErrorCode. */ + /** + * Static value ConditionNotMet for BlobErrorCode. + */ public static final BlobErrorCode CONDITION_NOT_MET = fromString("ConditionNotMet"); - /** Static value EmptyMetadataKey for BlobErrorCode. */ + /** + * Static value EmptyMetadataKey for BlobErrorCode. + */ public static final BlobErrorCode EMPTY_METADATA_KEY = fromString("EmptyMetadataKey"); - /** Static value InsufficientAccountPermissions for BlobErrorCode. */ + /** + * Static value InsufficientAccountPermissions for BlobErrorCode. + */ public static final BlobErrorCode INSUFFICIENT_ACCOUNT_PERMISSIONS = fromString("InsufficientAccountPermissions"); - /** Static value InternalError for BlobErrorCode. */ + /** + * Static value InternalError for BlobErrorCode. + */ public static final BlobErrorCode INTERNAL_ERROR = fromString("InternalError"); - /** Static value InvalidAuthenticationInfo for BlobErrorCode. */ + /** + * Static value InvalidAuthenticationInfo for BlobErrorCode. + */ public static final BlobErrorCode INVALID_AUTHENTICATION_INFO = fromString("InvalidAuthenticationInfo"); - /** Static value InvalidHeaderValue for BlobErrorCode. */ + /** + * Static value InvalidHeaderValue for BlobErrorCode. + */ public static final BlobErrorCode INVALID_HEADER_VALUE = fromString("InvalidHeaderValue"); - /** Static value InvalidHttpVerb for BlobErrorCode. */ + /** + * Static value InvalidHttpVerb for BlobErrorCode. + */ public static final BlobErrorCode INVALID_HTTP_VERB = fromString("InvalidHttpVerb"); - /** Static value InvalidInput for BlobErrorCode. */ + /** + * Static value InvalidInput for BlobErrorCode. + */ public static final BlobErrorCode INVALID_INPUT = fromString("InvalidInput"); - /** Static value InvalidMd5 for BlobErrorCode. */ + /** + * Static value InvalidMd5 for BlobErrorCode. + */ public static final BlobErrorCode INVALID_MD5 = fromString("InvalidMd5"); - /** Static value InvalidMetadata for BlobErrorCode. */ + /** + * Static value InvalidMetadata for BlobErrorCode. + */ public static final BlobErrorCode INVALID_METADATA = fromString("InvalidMetadata"); - /** Static value InvalidQueryParameterValue for BlobErrorCode. */ + /** + * Static value InvalidQueryParameterValue for BlobErrorCode. + */ public static final BlobErrorCode INVALID_QUERY_PARAMETER_VALUE = fromString("InvalidQueryParameterValue"); - /** Static value InvalidRange for BlobErrorCode. */ + /** + * Static value InvalidRange for BlobErrorCode. + */ public static final BlobErrorCode INVALID_RANGE = fromString("InvalidRange"); - /** Static value InvalidResourceName for BlobErrorCode. */ + /** + * Static value InvalidResourceName for BlobErrorCode. + */ public static final BlobErrorCode INVALID_RESOURCE_NAME = fromString("InvalidResourceName"); - /** Static value InvalidUri for BlobErrorCode. */ + /** + * Static value InvalidUri for BlobErrorCode. + */ public static final BlobErrorCode INVALID_URI = fromString("InvalidUri"); - /** Static value InvalidXmlDocument for BlobErrorCode. */ + /** + * Static value InvalidXmlDocument for BlobErrorCode. + */ public static final BlobErrorCode INVALID_XML_DOCUMENT = fromString("InvalidXmlDocument"); - /** Static value InvalidXmlNodeValue for BlobErrorCode. */ + /** + * Static value InvalidXmlNodeValue for BlobErrorCode. + */ public static final BlobErrorCode INVALID_XML_NODE_VALUE = fromString("InvalidXmlNodeValue"); - /** Static value Md5Mismatch for BlobErrorCode. */ + /** + * Static value Md5Mismatch for BlobErrorCode. + */ public static final BlobErrorCode MD5MISMATCH = fromString("Md5Mismatch"); - /** Static value MetadataTooLarge for BlobErrorCode. */ + /** + * Static value MetadataTooLarge for BlobErrorCode. + */ public static final BlobErrorCode METADATA_TOO_LARGE = fromString("MetadataTooLarge"); - /** Static value MissingContentLengthHeader for BlobErrorCode. */ + /** + * Static value MissingContentLengthHeader for BlobErrorCode. + */ public static final BlobErrorCode MISSING_CONTENT_LENGTH_HEADER = fromString("MissingContentLengthHeader"); - /** Static value MissingRequiredQueryParameter for BlobErrorCode. */ + /** + * Static value MissingRequiredQueryParameter for BlobErrorCode. + */ public static final BlobErrorCode MISSING_REQUIRED_QUERY_PARAMETER = fromString("MissingRequiredQueryParameter"); - /** Static value MissingRequiredHeader for BlobErrorCode. */ + /** + * Static value MissingRequiredHeader for BlobErrorCode. + */ public static final BlobErrorCode MISSING_REQUIRED_HEADER = fromString("MissingRequiredHeader"); - /** Static value MissingRequiredXmlNode for BlobErrorCode. */ + /** + * Static value MissingRequiredXmlNode for BlobErrorCode. + */ public static final BlobErrorCode MISSING_REQUIRED_XML_NODE = fromString("MissingRequiredXmlNode"); - /** Static value MultipleConditionHeadersNotSupported for BlobErrorCode. */ - public static final BlobErrorCode MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED = - fromString("MultipleConditionHeadersNotSupported"); + /** + * Static value MultipleConditionHeadersNotSupported for BlobErrorCode. + */ + public static final BlobErrorCode MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED + = fromString("MultipleConditionHeadersNotSupported"); - /** Static value OperationTimedOut for BlobErrorCode. */ + /** + * Static value OperationTimedOut for BlobErrorCode. + */ public static final BlobErrorCode OPERATION_TIMED_OUT = fromString("OperationTimedOut"); - /** Static value OutOfRangeInput for BlobErrorCode. */ + /** + * Static value OutOfRangeInput for BlobErrorCode. + */ public static final BlobErrorCode OUT_OF_RANGE_INPUT = fromString("OutOfRangeInput"); - /** Static value OutOfRangeQueryParameterValue for BlobErrorCode. */ + /** + * Static value OutOfRangeQueryParameterValue for BlobErrorCode. + */ public static final BlobErrorCode OUT_OF_RANGE_QUERY_PARAMETER_VALUE = fromString("OutOfRangeQueryParameterValue"); - /** Static value RequestBodyTooLarge for BlobErrorCode. */ + /** + * Static value RequestBodyTooLarge for BlobErrorCode. + */ public static final BlobErrorCode REQUEST_BODY_TOO_LARGE = fromString("RequestBodyTooLarge"); - /** Static value ResourceTypeMismatch for BlobErrorCode. */ + /** + * Static value ResourceTypeMismatch for BlobErrorCode. + */ public static final BlobErrorCode RESOURCE_TYPE_MISMATCH = fromString("ResourceTypeMismatch"); - /** Static value RequestUrlFailedToParse for BlobErrorCode. */ + /** + * Static value RequestUrlFailedToParse for BlobErrorCode. + */ public static final BlobErrorCode REQUEST_URL_FAILED_TO_PARSE = fromString("RequestUrlFailedToParse"); - /** Static value ResourceAlreadyExists for BlobErrorCode. */ + /** + * Static value ResourceAlreadyExists for BlobErrorCode. + */ public static final BlobErrorCode RESOURCE_ALREADY_EXISTS = fromString("ResourceAlreadyExists"); - /** Static value ResourceNotFound for BlobErrorCode. */ + /** + * Static value ResourceNotFound for BlobErrorCode. + */ public static final BlobErrorCode RESOURCE_NOT_FOUND = fromString("ResourceNotFound"); - /** Static value ServerBusy for BlobErrorCode. */ + /** + * Static value ServerBusy for BlobErrorCode. + */ public static final BlobErrorCode SERVER_BUSY = fromString("ServerBusy"); - /** Static value UnsupportedHeader for BlobErrorCode. */ + /** + * Static value UnsupportedHeader for BlobErrorCode. + */ public static final BlobErrorCode UNSUPPORTED_HEADER = fromString("UnsupportedHeader"); - /** Static value UnsupportedXmlNode for BlobErrorCode. */ + /** + * Static value UnsupportedXmlNode for BlobErrorCode. + */ public static final BlobErrorCode UNSUPPORTED_XML_NODE = fromString("UnsupportedXmlNode"); - /** Static value UnsupportedQueryParameter for BlobErrorCode. */ + /** + * Static value UnsupportedQueryParameter for BlobErrorCode. + */ public static final BlobErrorCode UNSUPPORTED_QUERY_PARAMETER = fromString("UnsupportedQueryParameter"); - /** Static value UnsupportedHttpVerb for BlobErrorCode. */ + /** + * Static value UnsupportedHttpVerb for BlobErrorCode. + */ public static final BlobErrorCode UNSUPPORTED_HTTP_VERB = fromString("UnsupportedHttpVerb"); - /** Static value AppendPositionConditionNotMet for BlobErrorCode. */ + /** + * Static value AppendPositionConditionNotMet for BlobErrorCode. + */ public static final BlobErrorCode APPEND_POSITION_CONDITION_NOT_MET = fromString("AppendPositionConditionNotMet"); - /** Static value BlobAlreadyExists for BlobErrorCode. */ + /** + * Static value BlobAlreadyExists for BlobErrorCode. + */ public static final BlobErrorCode BLOB_ALREADY_EXISTS = fromString("BlobAlreadyExists"); - /** Static value BlobImmutableDueToPolicy for BlobErrorCode. */ + /** + * Static value BlobImmutableDueToPolicy for BlobErrorCode. + */ public static final BlobErrorCode BLOB_IMMUTABLE_DUE_TO_POLICY = fromString("BlobImmutableDueToPolicy"); - /** Static value BlobNotFound for BlobErrorCode. */ + /** + * Static value BlobNotFound for BlobErrorCode. + */ public static final BlobErrorCode BLOB_NOT_FOUND = fromString("BlobNotFound"); - /** Static value BlobOverwritten for BlobErrorCode. */ + /** + * Static value BlobOverwritten for BlobErrorCode. + */ public static final BlobErrorCode BLOB_OVERWRITTEN = fromString("BlobOverwritten"); - /** Static value BlobTierInadequateForContentLength for BlobErrorCode. */ - public static final BlobErrorCode BLOB_TIER_INADEQUATE_FOR_CONTENT_LENGTH = - fromString("BlobTierInadequateForContentLength"); + /** + * Static value BlobTierInadequateForContentLength for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_TIER_INADEQUATE_FOR_CONTENT_LENGTH + = fromString("BlobTierInadequateForContentLength"); - /** Static value BlobUsesCustomerSpecifiedEncryption for BlobErrorCode. */ - public static final BlobErrorCode BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION = - fromString("BlobUsesCustomerSpecifiedEncryption"); + /** + * Static value BlobUsesCustomerSpecifiedEncryption for BlobErrorCode. + */ + public static final BlobErrorCode BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION + = fromString("BlobUsesCustomerSpecifiedEncryption"); - /** Static value BlockCountExceedsLimit for BlobErrorCode. */ + /** + * Static value BlockCountExceedsLimit for BlobErrorCode. + */ public static final BlobErrorCode BLOCK_COUNT_EXCEEDS_LIMIT = fromString("BlockCountExceedsLimit"); - /** Static value BlockListTooLong for BlobErrorCode. */ + /** + * Static value BlockListTooLong for BlobErrorCode. + */ public static final BlobErrorCode BLOCK_LIST_TOO_LONG = fromString("BlockListTooLong"); - /** Static value CannotChangeToLowerTier for BlobErrorCode. */ + /** + * Static value CannotChangeToLowerTier for BlobErrorCode. + */ public static final BlobErrorCode CANNOT_CHANGE_TO_LOWER_TIER = fromString("CannotChangeToLowerTier"); - /** Static value CannotVerifyCopySource for BlobErrorCode. */ + /** + * Static value CannotVerifyCopySource for BlobErrorCode. + */ public static final BlobErrorCode CANNOT_VERIFY_COPY_SOURCE = fromString("CannotVerifyCopySource"); - /** Static value ContainerAlreadyExists for BlobErrorCode. */ + /** + * Static value ContainerAlreadyExists for BlobErrorCode. + */ public static final BlobErrorCode CONTAINER_ALREADY_EXISTS = fromString("ContainerAlreadyExists"); - /** Static value ContainerBeingDeleted for BlobErrorCode. */ + /** + * Static value ContainerBeingDeleted for BlobErrorCode. + */ public static final BlobErrorCode CONTAINER_BEING_DELETED = fromString("ContainerBeingDeleted"); - /** Static value ContainerDisabled for BlobErrorCode. */ + /** + * Static value ContainerDisabled for BlobErrorCode. + */ public static final BlobErrorCode CONTAINER_DISABLED = fromString("ContainerDisabled"); - /** Static value ContainerNotFound for BlobErrorCode. */ + /** + * Static value ContainerNotFound for BlobErrorCode. + */ public static final BlobErrorCode CONTAINER_NOT_FOUND = fromString("ContainerNotFound"); - /** Static value ContentLengthLargerThanTierLimit for BlobErrorCode. */ - public static final BlobErrorCode CONTENT_LENGTH_LARGER_THAN_TIER_LIMIT = - fromString("ContentLengthLargerThanTierLimit"); + /** + * Static value ContentLengthLargerThanTierLimit for BlobErrorCode. + */ + public static final BlobErrorCode CONTENT_LENGTH_LARGER_THAN_TIER_LIMIT + = fromString("ContentLengthLargerThanTierLimit"); - /** Static value CopyAcrossAccountsNotSupported for BlobErrorCode. */ + /** + * Static value CopyAcrossAccountsNotSupported for BlobErrorCode. + */ public static final BlobErrorCode COPY_ACROSS_ACCOUNTS_NOT_SUPPORTED = fromString("CopyAcrossAccountsNotSupported"); - /** Static value CopyIdMismatch for BlobErrorCode. */ + /** + * Static value CopyIdMismatch for BlobErrorCode. + */ public static final BlobErrorCode COPY_ID_MISMATCH = fromString("CopyIdMismatch"); - /** Static value FeatureVersionMismatch for BlobErrorCode. */ + /** + * Static value FeatureVersionMismatch for BlobErrorCode. + */ public static final BlobErrorCode FEATURE_VERSION_MISMATCH = fromString("FeatureVersionMismatch"); - /** Static value IncrementalCopyBlobMismatch for BlobErrorCode. */ + /** + * Static value IncrementalCopyBlobMismatch for BlobErrorCode. + */ public static final BlobErrorCode INCREMENTAL_COPY_BLOB_MISMATCH = fromString("IncrementalCopyBlobMismatch"); - /** Static value IncrementalCopyOfEarlierVersionSnapshotNotAllowed for BlobErrorCode. */ - public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED = - fromString("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); + /** + * Static value IncrementalCopyOfEarlierVersionSnapshotNotAllowed for BlobErrorCode. + */ + public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); - /** Static value IncrementalCopySourceMustBeSnapshot for BlobErrorCode. */ - public static final BlobErrorCode INCREMENTAL_COPY_SOURCE_MUST_BE_SNAPSHOT = - fromString("IncrementalCopySourceMustBeSnapshot"); + /** + * Static value IncrementalCopySourceMustBeSnapshot for BlobErrorCode. + */ + public static final BlobErrorCode INCREMENTAL_COPY_SOURCE_MUST_BE_SNAPSHOT + = fromString("IncrementalCopySourceMustBeSnapshot"); - /** Static value InfiniteLeaseDurationRequired for BlobErrorCode. */ + /** + * Static value InfiniteLeaseDurationRequired for BlobErrorCode. + */ public static final BlobErrorCode INFINITE_LEASE_DURATION_REQUIRED = fromString("InfiniteLeaseDurationRequired"); - /** Static value InvalidBlobOrBlock for BlobErrorCode. */ + /** + * Static value InvalidBlobOrBlock for BlobErrorCode. + */ public static final BlobErrorCode INVALID_BLOB_OR_BLOCK = fromString("InvalidBlobOrBlock"); - /** Static value InvalidBlobTier for BlobErrorCode. */ + /** + * Static value InvalidBlobTier for BlobErrorCode. + */ public static final BlobErrorCode INVALID_BLOB_TIER = fromString("InvalidBlobTier"); - /** Static value InvalidBlobType for BlobErrorCode. */ + /** + * Static value InvalidBlobType for BlobErrorCode. + */ public static final BlobErrorCode INVALID_BLOB_TYPE = fromString("InvalidBlobType"); - /** Static value InvalidBlockId for BlobErrorCode. */ + /** + * Static value InvalidBlockId for BlobErrorCode. + */ public static final BlobErrorCode INVALID_BLOCK_ID = fromString("InvalidBlockId"); - /** Static value InvalidBlockList for BlobErrorCode. */ + /** + * Static value InvalidBlockList for BlobErrorCode. + */ public static final BlobErrorCode INVALID_BLOCK_LIST = fromString("InvalidBlockList"); - /** Static value InvalidOperation for BlobErrorCode. */ + /** + * Static value InvalidOperation for BlobErrorCode. + */ public static final BlobErrorCode INVALID_OPERATION = fromString("InvalidOperation"); - /** Static value InvalidPageRange for BlobErrorCode. */ + /** + * Static value InvalidPageRange for BlobErrorCode. + */ public static final BlobErrorCode INVALID_PAGE_RANGE = fromString("InvalidPageRange"); - /** Static value InvalidSourceBlobType for BlobErrorCode. */ + /** + * Static value InvalidSourceBlobType for BlobErrorCode. + */ public static final BlobErrorCode INVALID_SOURCE_BLOB_TYPE = fromString("InvalidSourceBlobType"); - /** Static value InvalidSourceBlobUrl for BlobErrorCode. */ + /** + * Static value InvalidSourceBlobUrl for BlobErrorCode. + */ public static final BlobErrorCode INVALID_SOURCE_BLOB_URL = fromString("InvalidSourceBlobUrl"); - /** Static value InvalidVersionForPageBlobOperation for BlobErrorCode. */ - public static final BlobErrorCode INVALID_VERSION_FOR_PAGE_BLOB_OPERATION = - fromString("InvalidVersionForPageBlobOperation"); + /** + * Static value InvalidVersionForPageBlobOperation for BlobErrorCode. + */ + public static final BlobErrorCode INVALID_VERSION_FOR_PAGE_BLOB_OPERATION + = fromString("InvalidVersionForPageBlobOperation"); - /** Static value LeaseAlreadyPresent for BlobErrorCode. */ + /** + * Static value LeaseAlreadyPresent for BlobErrorCode. + */ public static final BlobErrorCode LEASE_ALREADY_PRESENT = fromString("LeaseAlreadyPresent"); - /** Static value LeaseAlreadyBroken for BlobErrorCode. */ + /** + * Static value LeaseAlreadyBroken for BlobErrorCode. + */ public static final BlobErrorCode LEASE_ALREADY_BROKEN = fromString("LeaseAlreadyBroken"); - /** Static value LeaseIdMismatchWithBlobOperation for BlobErrorCode. */ - public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_BLOB_OPERATION = - fromString("LeaseIdMismatchWithBlobOperation"); + /** + * Static value LeaseIdMismatchWithBlobOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_BLOB_OPERATION + = fromString("LeaseIdMismatchWithBlobOperation"); - /** Static value LeaseIdMismatchWithContainerOperation for BlobErrorCode. */ - public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_CONTAINER_OPERATION = - fromString("LeaseIdMismatchWithContainerOperation"); + /** + * Static value LeaseIdMismatchWithContainerOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_CONTAINER_OPERATION + = fromString("LeaseIdMismatchWithContainerOperation"); - /** Static value LeaseIdMismatchWithLeaseOperation for BlobErrorCode. */ - public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_LEASE_OPERATION = - fromString("LeaseIdMismatchWithLeaseOperation"); + /** + * Static value LeaseIdMismatchWithLeaseOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_LEASE_OPERATION + = fromString("LeaseIdMismatchWithLeaseOperation"); - /** Static value LeaseIdMissing for BlobErrorCode. */ + /** + * Static value LeaseIdMissing for BlobErrorCode. + */ public static final BlobErrorCode LEASE_ID_MISSING = fromString("LeaseIdMissing"); - /** Static value LeaseIsBreakingAndCannotBeAcquired for BlobErrorCode. */ - public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_ACQUIRED = - fromString("LeaseIsBreakingAndCannotBeAcquired"); + /** + * Static value LeaseIsBreakingAndCannotBeAcquired for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_ACQUIRED + = fromString("LeaseIsBreakingAndCannotBeAcquired"); - /** Static value LeaseIsBreakingAndCannotBeChanged for BlobErrorCode. */ - public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_CHANGED = - fromString("LeaseIsBreakingAndCannotBeChanged"); + /** + * Static value LeaseIsBreakingAndCannotBeChanged for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_CHANGED + = fromString("LeaseIsBreakingAndCannotBeChanged"); - /** Static value LeaseIsBrokenAndCannotBeRenewed for BlobErrorCode. */ - public static final BlobErrorCode LEASE_IS_BROKEN_AND_CANNOT_BE_RENEWED = - fromString("LeaseIsBrokenAndCannotBeRenewed"); + /** + * Static value LeaseIsBrokenAndCannotBeRenewed for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_IS_BROKEN_AND_CANNOT_BE_RENEWED + = fromString("LeaseIsBrokenAndCannotBeRenewed"); - /** Static value LeaseLost for BlobErrorCode. */ + /** + * Static value LeaseLost for BlobErrorCode. + */ public static final BlobErrorCode LEASE_LOST = fromString("LeaseLost"); - /** Static value LeaseNotPresentWithBlobOperation for BlobErrorCode. */ - public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_BLOB_OPERATION = - fromString("LeaseNotPresentWithBlobOperation"); + /** + * Static value LeaseNotPresentWithBlobOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_BLOB_OPERATION + = fromString("LeaseNotPresentWithBlobOperation"); - /** Static value LeaseNotPresentWithContainerOperation for BlobErrorCode. */ - public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_CONTAINER_OPERATION = - fromString("LeaseNotPresentWithContainerOperation"); + /** + * Static value LeaseNotPresentWithContainerOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_CONTAINER_OPERATION + = fromString("LeaseNotPresentWithContainerOperation"); - /** Static value LeaseNotPresentWithLeaseOperation for BlobErrorCode. */ - public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_LEASE_OPERATION = - fromString("LeaseNotPresentWithLeaseOperation"); + /** + * Static value LeaseNotPresentWithLeaseOperation for BlobErrorCode. + */ + public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_LEASE_OPERATION + = fromString("LeaseNotPresentWithLeaseOperation"); - /** Static value MaxBlobSizeConditionNotMet for BlobErrorCode. */ + /** + * Static value MaxBlobSizeConditionNotMet for BlobErrorCode. + */ public static final BlobErrorCode MAX_BLOB_SIZE_CONDITION_NOT_MET = fromString("MaxBlobSizeConditionNotMet"); - /** Static value NoAuthenticationInformation for BlobErrorCode. */ + /** + * Static value NoAuthenticationInformation for BlobErrorCode. + */ public static final BlobErrorCode NO_AUTHENTICATION_INFORMATION = fromString("NoAuthenticationInformation"); - /** Static value NoPendingCopyOperation for BlobErrorCode. */ + /** + * Static value NoPendingCopyOperation for BlobErrorCode. + */ public static final BlobErrorCode NO_PENDING_COPY_OPERATION = fromString("NoPendingCopyOperation"); - /** Static value OperationNotAllowedOnIncrementalCopyBlob for BlobErrorCode. */ - public static final BlobErrorCode OPERATION_NOT_ALLOWED_ON_INCREMENTAL_COPY_BLOB = - fromString("OperationNotAllowedOnIncrementalCopyBlob"); + /** + * Static value OperationNotAllowedOnIncrementalCopyBlob for BlobErrorCode. + */ + public static final BlobErrorCode OPERATION_NOT_ALLOWED_ON_INCREMENTAL_COPY_BLOB + = fromString("OperationNotAllowedOnIncrementalCopyBlob"); - /** Static value PendingCopyOperation for BlobErrorCode. */ + /** + * Static value PendingCopyOperation for BlobErrorCode. + */ public static final BlobErrorCode PENDING_COPY_OPERATION = fromString("PendingCopyOperation"); - /** Static value PreviousSnapshotCannotBeNewer for BlobErrorCode. */ + /** + * Static value PreviousSnapshotCannotBeNewer for BlobErrorCode. + */ public static final BlobErrorCode PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER = fromString("PreviousSnapshotCannotBeNewer"); - /** Static value PreviousSnapshotNotFound for BlobErrorCode. */ + /** + * Static value PreviousSnapshotNotFound for BlobErrorCode. + */ public static final BlobErrorCode PREVIOUS_SNAPSHOT_NOT_FOUND = fromString("PreviousSnapshotNotFound"); - /** Static value PreviousSnapshotOperationNotSupported for BlobErrorCode. */ - public static final BlobErrorCode PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED = - fromString("PreviousSnapshotOperationNotSupported"); + /** + * Static value PreviousSnapshotOperationNotSupported for BlobErrorCode. + */ + public static final BlobErrorCode PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED + = fromString("PreviousSnapshotOperationNotSupported"); - /** Static value SequenceNumberConditionNotMet for BlobErrorCode. */ + /** + * Static value SequenceNumberConditionNotMet for BlobErrorCode. + */ public static final BlobErrorCode SEQUENCE_NUMBER_CONDITION_NOT_MET = fromString("SequenceNumberConditionNotMet"); - /** Static value SequenceNumberIncrementTooLarge for BlobErrorCode. */ - public static final BlobErrorCode SEQUENCE_NUMBER_INCREMENT_TOO_LARGE = - fromString("SequenceNumberIncrementTooLarge"); + /** + * Static value SequenceNumberIncrementTooLarge for BlobErrorCode. + */ + public static final BlobErrorCode SEQUENCE_NUMBER_INCREMENT_TOO_LARGE + = fromString("SequenceNumberIncrementTooLarge"); - /** Static value SnapshotCountExceeded for BlobErrorCode. */ + /** + * Static value SnapshotCountExceeded for BlobErrorCode. + */ public static final BlobErrorCode SNAPSHOT_COUNT_EXCEEDED = fromString("SnapshotCountExceeded"); - /** Static value SnapshotOperationRateExceeded for BlobErrorCode. */ + /** + * Static value SnapshotOperationRateExceeded for BlobErrorCode. + */ public static final BlobErrorCode SNAPSHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); - /** Static value SnapshotsPresent for BlobErrorCode. */ + /** + * Static value SnapshotsPresent for BlobErrorCode. + */ public static final BlobErrorCode SNAPSHOTS_PRESENT = fromString("SnapshotsPresent"); - /** Static value SourceConditionNotMet for BlobErrorCode. */ + /** + * Static value SourceConditionNotMet for BlobErrorCode. + */ public static final BlobErrorCode SOURCE_CONDITION_NOT_MET = fromString("SourceConditionNotMet"); - /** Static value SystemInUse for BlobErrorCode. */ + /** + * Static value SystemInUse for BlobErrorCode. + */ public static final BlobErrorCode SYSTEM_IN_USE = fromString("SystemInUse"); - /** Static value TargetConditionNotMet for BlobErrorCode. */ + /** + * Static value TargetConditionNotMet for BlobErrorCode. + */ public static final BlobErrorCode TARGET_CONDITION_NOT_MET = fromString("TargetConditionNotMet"); - /** Static value UnauthorizedBlobOverwrite for BlobErrorCode. */ + /** + * Static value UnauthorizedBlobOverwrite for BlobErrorCode. + */ public static final BlobErrorCode UNAUTHORIZED_BLOB_OVERWRITE = fromString("UnauthorizedBlobOverwrite"); - /** Static value BlobBeingRehydrated for BlobErrorCode. */ + /** + * Static value BlobBeingRehydrated for BlobErrorCode. + */ public static final BlobErrorCode BLOB_BEING_REHYDRATED = fromString("BlobBeingRehydrated"); - /** Static value BlobArchived for BlobErrorCode. */ + /** + * Static value BlobArchived for BlobErrorCode. + */ public static final BlobErrorCode BLOB_ARCHIVED = fromString("BlobArchived"); - /** Static value BlobNotArchived for BlobErrorCode. */ + /** + * Static value BlobNotArchived for BlobErrorCode. + */ public static final BlobErrorCode BLOB_NOT_ARCHIVED = fromString("BlobNotArchived"); - /** Static value AuthorizationSourceIPMismatch for BlobErrorCode. */ + /** + * Static value AuthorizationSourceIPMismatch for BlobErrorCode. + */ public static final BlobErrorCode AUTHORIZATION_SOURCE_IPMISMATCH = fromString("AuthorizationSourceIPMismatch"); - /** Static value AuthorizationProtocolMismatch for BlobErrorCode. */ + /** + * Static value AuthorizationProtocolMismatch for BlobErrorCode. + */ public static final BlobErrorCode AUTHORIZATION_PROTOCOL_MISMATCH = fromString("AuthorizationProtocolMismatch"); - /** Static value AuthorizationPermissionMismatch for BlobErrorCode. */ + /** + * Static value AuthorizationPermissionMismatch for BlobErrorCode. + */ public static final BlobErrorCode AUTHORIZATION_PERMISSION_MISMATCH = fromString("AuthorizationPermissionMismatch"); - /** Static value AuthorizationServiceMismatch for BlobErrorCode. */ + /** + * Static value AuthorizationServiceMismatch for BlobErrorCode. + */ public static final BlobErrorCode AUTHORIZATION_SERVICE_MISMATCH = fromString("AuthorizationServiceMismatch"); - /** Static value AuthorizationResourceTypeMismatch for BlobErrorCode. */ - public static final BlobErrorCode AUTHORIZATION_RESOURCE_TYPE_MISMATCH = - fromString("AuthorizationResourceTypeMismatch"); + /** + * Static value AuthorizationResourceTypeMismatch for BlobErrorCode. + */ + public static final BlobErrorCode AUTHORIZATION_RESOURCE_TYPE_MISMATCH + = fromString("AuthorizationResourceTypeMismatch"); /** * Static value SnapshotOperationRateExceeded for BlobErrorCode. - * + * * @deprecated Please use {@link BlobErrorCode#SNAPSHOT_OPERATION_RATE_EXCEEDED} */ @Deprecated @@ -379,35 +607,35 @@ public final class BlobErrorCode extends ExpandableStringEnum { /** * Static value IncrementalCopyOfEralierVersionSnapshotNotAllowed for BlobErrorCode. - * + * * @deprecated Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED} */ @Deprecated - public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED = - fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); + public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); /** * Creates a new instance of BlobErrorCode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public BlobErrorCode() {} + public BlobErrorCode() { + } /** * Creates or finds a BlobErrorCode from its string representation. - * + * * @param name a name to look for. * @return the corresponding BlobErrorCode. */ - @JsonCreator public static BlobErrorCode fromString(String name) { return fromString(name, BlobErrorCode.class); } /** * Gets known BlobErrorCode values. - * + * * @return known BlobErrorCode values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java index 08495c2187d92..d287cf2d101a8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobHttpHeaders.java @@ -1,67 +1,57 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** Parameter group. */ -@JacksonXmlRootElement(localName = "blob-http-headers") +/** + * Parameter group. + */ @Fluent public final class BlobHttpHeaders { - /* - * Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a - * read request. + * Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request. */ - @JsonProperty(value = "cacheControl") private String cacheControl; /* - * Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a - * read request. + * Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request. */ - @JsonProperty(value = "contentType") private String contentType; /* - * Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the - * individual blocks were validated when each was uploaded. The value does not need to be base64 encoded as the SDK - * will perform the encoding. + * Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 encoded as the SDK will perform the encoding. */ - @JsonProperty(value = "contentMd5") private byte[] contentMd5; /* - * Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned - * with a read request. + * Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read request. */ - @JsonProperty(value = "contentEncoding") private String contentEncoding; /* - * Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with - * a read request. + * Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read request. */ - @JsonProperty(value = "contentLanguage") private String contentLanguage; /* * Optional. Sets the blob's Content-Disposition header. */ - @JsonProperty(value = "contentDisposition") private String contentDisposition; - /** Creates an instance of BlobHttpHeaders class. */ - public BlobHttpHeaders() {} + /** + * Creates an instance of BlobHttpHeaders class. + */ + public BlobHttpHeaders() { + } /** * Get the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored * with the blob and returned with a read request. - * + * * @return the cacheControl value. */ public String getCacheControl() { @@ -71,7 +61,7 @@ public String getCacheControl() { /** * Set the cacheControl property: Optional. Sets the blob's cache control. If specified, this property is stored * with the blob and returned with a read request. - * + * * @param cacheControl the cacheControl value to set. * @return the BlobHttpHeaders object itself. */ @@ -83,7 +73,7 @@ public BlobHttpHeaders setCacheControl(String cacheControl) { /** * Get the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with * the blob and returned with a read request. - * + * * @return the contentType value. */ public String getContentType() { @@ -93,7 +83,7 @@ public String getContentType() { /** * Set the contentType property: Optional. Sets the blob's content type. If specified, this property is stored with * the blob and returned with a read request. - * + * * @param contentType the contentType value to set. * @return the BlobHttpHeaders object itself. */ @@ -106,7 +96,7 @@ public BlobHttpHeaders setContentType(String contentType) { * Get the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 * encoded as the SDK will perform the encoding. - * + * * @return the contentMd5 value. */ public byte[] getContentMd5() { @@ -117,7 +107,7 @@ public byte[] getContentMd5() { * Set the contentMd5 property: Optional. An MD5 hash of the blob content. Note that this hash is not validated, as * the hashes for the individual blocks were validated when each was uploaded. The value does not need to be base64 * encoded as the SDK will perform the encoding. - * + * * @param contentMd5 the contentMd5 value to set. * @return the BlobHttpHeaders object itself. */ @@ -129,7 +119,7 @@ public BlobHttpHeaders setContentMd5(byte[] contentMd5) { /** * Get the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is * stored with the blob and returned with a read request. - * + * * @return the contentEncoding value. */ public String getContentEncoding() { @@ -139,7 +129,7 @@ public String getContentEncoding() { /** * Set the contentEncoding property: Optional. Sets the blob's content encoding. If specified, this property is * stored with the blob and returned with a read request. - * + * * @param contentEncoding the contentEncoding value to set. * @return the BlobHttpHeaders object itself. */ @@ -151,7 +141,7 @@ public BlobHttpHeaders setContentEncoding(String contentEncoding) { /** * Get the contentLanguage property: Optional. Set the blob's content language. If specified, this property is * stored with the blob and returned with a read request. - * + * * @return the contentLanguage value. */ public String getContentLanguage() { @@ -161,7 +151,7 @@ public String getContentLanguage() { /** * Set the contentLanguage property: Optional. Set the blob's content language. If specified, this property is * stored with the blob and returned with a read request. - * + * * @param contentLanguage the contentLanguage value to set. * @return the BlobHttpHeaders object itself. */ @@ -172,7 +162,7 @@ public BlobHttpHeaders setContentLanguage(String contentLanguage) { /** * Get the contentDisposition property: Optional. Sets the blob's Content-Disposition header. - * + * * @return the contentDisposition value. */ public String getContentDisposition() { @@ -181,7 +171,7 @@ public String getContentDisposition() { /** * Set the contentDisposition property: Optional. Sets the blob's Content-Disposition header. - * + * * @param contentDisposition the contentDisposition value to set. * @return the BlobHttpHeaders object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java index 4174b05ec0df6..cdbf65dad1d01 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java @@ -4,21 +4,28 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for BlobImmutabilityPolicyMode. */ +/** + * Defines values for BlobImmutabilityPolicyMode. + */ public enum BlobImmutabilityPolicyMode { - /** Enum value Mutable. */ + /** + * Enum value Mutable. + */ MUTABLE("Mutable"), - /** Enum value Unlocked. */ + /** + * Enum value Unlocked. + */ UNLOCKED("Unlocked"), - /** Enum value Locked. */ + /** + * Enum value Locked. + */ LOCKED("Locked"); - /** The actual serialized value for a BlobImmutabilityPolicyMode instance. */ + /** + * The actual serialized value for a BlobImmutabilityPolicyMode instance. + */ private final String value; BlobImmutabilityPolicyMode(String value) { @@ -27,11 +34,10 @@ public enum BlobImmutabilityPolicyMode { /** * Parses a serialized value to a BlobImmutabilityPolicyMode instance. - * + * * @param value the serialized value to parse. * @return the parsed BlobImmutabilityPolicyMode object, or null if unable to parse. */ - @JsonCreator public static BlobImmutabilityPolicyMode fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static BlobImmutabilityPolicyMode fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java index 3793e8aee449f..e27daf62c29ca 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobMetrics.java @@ -1,47 +1,52 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** a summary of request statistics grouped by API in hour or minute aggregates for blobs. */ -@JacksonXmlRootElement(localName = "Metrics") +/** + * a summary of request statistics grouped by API in hour or minute aggregates for blobs. + */ @Fluent -public final class BlobMetrics { - +public final class BlobMetrics implements XmlSerializable { /* * The version of Storage Analytics to configure. */ - @JsonProperty(value = "Version") private String version; /* * Indicates whether metrics are enabled for the Blob service. */ - @JsonProperty(value = "Enabled", required = true) private boolean enabled; /* * Indicates whether metrics should generate summary statistics for called API operations. */ - @JsonProperty(value = "IncludeAPIs") private Boolean includeApis; /* * the retention policy which determines how long the associated data should persist */ - @JsonProperty(value = "RetentionPolicy") private BlobRetentionPolicy retentionPolicy; - /** Creates an instance of BlobMetrics class. */ - public BlobMetrics() {} + /** + * Creates an instance of BlobMetrics class. + */ + public BlobMetrics() { + } /** * Get the version property: The version of Storage Analytics to configure. - * + * * @return the version value. */ public String getVersion() { @@ -50,7 +55,7 @@ public String getVersion() { /** * Set the version property: The version of Storage Analytics to configure. - * + * * @param version the version value to set. * @return the BlobMetrics object itself. */ @@ -61,7 +66,7 @@ public BlobMetrics setVersion(String version) { /** * Get the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -70,7 +75,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * * @param enabled the enabled value to set. * @return the BlobMetrics object itself. */ @@ -82,7 +87,7 @@ public BlobMetrics setEnabled(boolean enabled) { /** * Get the includeApis property: Indicates whether metrics should generate summary statistics for called API * operations. - * + * * @return the includeApis value. */ public Boolean isIncludeApis() { @@ -92,7 +97,7 @@ public Boolean isIncludeApis() { /** * Set the includeApis property: Indicates whether metrics should generate summary statistics for called API * operations. - * + * * @param includeApis the includeApis value to set. * @return the BlobMetrics object itself. */ @@ -104,7 +109,7 @@ public BlobMetrics setIncludeApis(Boolean includeApis) { /** * Get the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the retentionPolicy value. */ public BlobRetentionPolicy getRetentionPolicy() { @@ -114,7 +119,7 @@ public BlobRetentionPolicy getRetentionPolicy() { /** * Set the retentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobMetrics object itself. */ @@ -122,4 +127,68 @@ public BlobMetrics setRetentionPolicy(BlobRetentionPolicy retentionPolicy) { this.retentionPolicy = retentionPolicy; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobMetrics" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Version", this.version); + xmlWriter.writeBooleanElement("Enabled", this.enabled); + xmlWriter.writeBooleanElement("IncludeAPIs", this.includeApis); + xmlWriter.writeXml(this.retentionPolicy, "RetentionPolicy"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobMetrics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobMetrics if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobMetrics. + */ + public static BlobMetrics fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobMetrics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobMetrics if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobMetrics. + */ + public static BlobMetrics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobMetrics" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobMetrics deserializedBlobMetrics = new BlobMetrics(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Version".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.version = reader.getStringElement(); + } else if ("Enabled".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.enabled = reader.getBooleanElement(); + } else if ("IncludeAPIs".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.includeApis = reader.getNullableElement(Boolean::parseBoolean); + } else if ("RetentionPolicy".equals(elementName.getLocalPart())) { + deserializedBlobMetrics.retentionPolicy = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobMetrics; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java index ec1d3df5432ac..a1e445bec0685 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java @@ -1,36 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** the retention policy which determines how long the associated data should persist. */ -@JacksonXmlRootElement(localName = "RetentionPolicy") +/** + * the retention policy which determines how long the associated data should persist. + */ @Fluent -public final class BlobRetentionPolicy { - +public final class BlobRetentionPolicy implements XmlSerializable { /* * Indicates whether a retention policy is enabled for the storage service */ - @JsonProperty(value = "Enabled", required = true) private boolean enabled; /* - * Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older - * than this value will be deleted + * Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted */ - @JsonProperty(value = "Days") private Integer days; - /** Creates an instance of BlobRetentionPolicy class. */ - public BlobRetentionPolicy() {} + /** + * Creates an instance of BlobRetentionPolicy class. + */ + public BlobRetentionPolicy() { + } /** * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -39,7 +45,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * * @param enabled the enabled value to set. * @return the BlobRetentionPolicy object itself. */ @@ -51,7 +57,7 @@ public BlobRetentionPolicy setEnabled(boolean enabled) { /** * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @return the days value. */ public Integer getDays() { @@ -61,7 +67,7 @@ public Integer getDays() { /** * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be * retained. All data older than this value will be deleted. - * + * * @param days the days value to set. * @return the BlobRetentionPolicy object itself. */ @@ -69,4 +75,63 @@ public BlobRetentionPolicy setDays(Integer days) { this.days = days; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobRetentionPolicy" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanElement("Enabled", this.enabled); + xmlWriter.writeNumberElement("Days", this.days); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobRetentionPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobRetentionPolicy. + */ + public static BlobRetentionPolicy fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobRetentionPolicy from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobRetentionPolicy if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobRetentionPolicy. + */ + public static BlobRetentionPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobRetentionPolicy" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobRetentionPolicy deserializedBlobRetentionPolicy = new BlobRetentionPolicy(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Enabled".equals(elementName.getLocalPart())) { + deserializedBlobRetentionPolicy.enabled = reader.getBooleanElement(); + } else if ("Days".equals(elementName.getLocalPart())) { + deserializedBlobRetentionPolicy.days = reader.getNullableElement(Integer::parseInt); + } else { + reader.skipElement(); + } + } + + return deserializedBlobRetentionPolicy; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java index 7a04e8ebad8f3..2f45ea3abdc7c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java @@ -5,76 +5,65 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Storage Service Properties. */ -@JacksonXmlRootElement(localName = "StorageServiceProperties") +/** + * Storage Service Properties. + */ @Fluent -public final class BlobServiceProperties { +public final class BlobServiceProperties implements XmlSerializable { /* * Azure Analytics Logging settings. */ - @JsonProperty(value = "Logging") private BlobAnalyticsLogging logging; /* * a summary of request statistics grouped by API in hour or minute aggregates for blobs */ - @JsonProperty(value = "HourMetrics") private BlobMetrics hourMetrics; /* * a summary of request statistics grouped by API in hour or minute aggregates for blobs */ - @JsonProperty(value = "MinuteMetrics") private BlobMetrics minuteMetrics; - private static final class CorsWrapper { - @JacksonXmlProperty(localName = "CorsRule") - private final List items; - - @JsonCreator - private CorsWrapper(@JacksonXmlProperty(localName = "CorsRule") List items) { - this.items = items; - } - } - /* * The set of CORS rules. */ - @JsonProperty(value = "Cors") - private CorsWrapper cors; + private List cors; /* - * The default version to use for requests to the Blob service if an incoming request's version is not specified. - * Possible values include version 2008-10-27 and all more recent versions + * The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions */ - @JsonProperty(value = "DefaultServiceVersion") private String defaultServiceVersion; /* * the retention policy which determines how long the associated data should persist */ - @JsonProperty(value = "DeleteRetentionPolicy") private BlobRetentionPolicy deleteRetentionPolicy; /* * The properties that enable an account to host a static website */ - @JsonProperty(value = "StaticWebsite") private StaticWebsite staticWebsite; - /** Creates an instance of BlobServiceProperties class. */ - public BlobServiceProperties() {} + /** + * Creates an instance of BlobServiceProperties class. + */ + public BlobServiceProperties() { + } /** * Get the logging property: Azure Analytics Logging settings. - * + * * @return the logging value. */ public BlobAnalyticsLogging getLogging() { @@ -83,7 +72,7 @@ public BlobAnalyticsLogging getLogging() { /** * Set the logging property: Azure Analytics Logging settings. - * + * * @param logging the logging value to set. * @return the BlobServiceProperties object itself. */ @@ -95,7 +84,7 @@ public BlobServiceProperties setLogging(BlobAnalyticsLogging logging) { /** * Get the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @return the hourMetrics value. */ public BlobMetrics getHourMetrics() { @@ -105,7 +94,7 @@ public BlobMetrics getHourMetrics() { /** * Set the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @param hourMetrics the hourMetrics value to set. * @return the BlobServiceProperties object itself. */ @@ -117,7 +106,7 @@ public BlobServiceProperties setHourMetrics(BlobMetrics hourMetrics) { /** * Get the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @return the minuteMetrics value. */ public BlobMetrics getMinuteMetrics() { @@ -127,7 +116,7 @@ public BlobMetrics getMinuteMetrics() { /** * Set the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for * blobs. - * + * * @param minuteMetrics the minuteMetrics value to set. * @return the BlobServiceProperties object itself. */ @@ -138,24 +127,24 @@ public BlobServiceProperties setMinuteMetrics(BlobMetrics minuteMetrics) { /** * Get the cors property: The set of CORS rules. - * + * * @return the cors value. */ public List getCors() { if (this.cors == null) { - this.cors = new CorsWrapper(new ArrayList()); + this.cors = new ArrayList<>(); } - return this.cors.items; + return this.cors; } /** * Set the cors property: The set of CORS rules. - * + * * @param cors the cors value to set. * @return the BlobServiceProperties object itself. */ public BlobServiceProperties setCors(List cors) { - this.cors = new CorsWrapper(cors); + this.cors = cors; return this; } @@ -163,7 +152,7 @@ public BlobServiceProperties setCors(List cors) { * Get the defaultServiceVersion property: The default version to use for requests to the Blob service if an * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent * versions. - * + * * @return the defaultServiceVersion value. */ public String getDefaultServiceVersion() { @@ -174,7 +163,7 @@ public String getDefaultServiceVersion() { * Set the defaultServiceVersion property: The default version to use for requests to the Blob service if an * incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent * versions. - * + * * @param defaultServiceVersion the defaultServiceVersion value to set. * @return the BlobServiceProperties object itself. */ @@ -186,7 +175,7 @@ public BlobServiceProperties setDefaultServiceVersion(String defaultServiceVersi /** * Get the deleteRetentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @return the deleteRetentionPolicy value. */ public BlobRetentionPolicy getDeleteRetentionPolicy() { @@ -196,7 +185,7 @@ public BlobRetentionPolicy getDeleteRetentionPolicy() { /** * Set the deleteRetentionPolicy property: the retention policy which determines how long the associated data should * persist. - * + * * @param deleteRetentionPolicy the deleteRetentionPolicy value to set. * @return the BlobServiceProperties object itself. */ @@ -207,7 +196,7 @@ public BlobServiceProperties setDeleteRetentionPolicy(BlobRetentionPolicy delete /** * Get the staticWebsite property: The properties that enable an account to host a static website. - * + * * @return the staticWebsite value. */ public StaticWebsite getStaticWebsite() { @@ -216,7 +205,7 @@ public StaticWebsite getStaticWebsite() { /** * Set the staticWebsite property: The properties that enable an account to host a static website. - * + * * @param staticWebsite the staticWebsite value to set. * @return the BlobServiceProperties object itself. */ @@ -224,4 +213,93 @@ public BlobServiceProperties setStaticWebsite(StaticWebsite staticWebsite) { this.staticWebsite = staticWebsite; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceProperties" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.logging, "Logging"); + xmlWriter.writeXml(this.hourMetrics, "HourMetrics"); + xmlWriter.writeXml(this.minuteMetrics, "MinuteMetrics"); + if (this.cors != null) { + xmlWriter.writeStartElement("Cors"); + for (BlobCorsRule element : this.cors) { + xmlWriter.writeXml(element, "CorsRule"); + } + xmlWriter.writeEndElement(); + } + xmlWriter.writeStringElement("DefaultServiceVersion", this.defaultServiceVersion); + xmlWriter.writeXml(this.deleteRetentionPolicy, "DeleteRetentionPolicy"); + xmlWriter.writeXml(this.staticWebsite, "StaticWebsite"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobServiceProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobServiceProperties if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceProperties. + */ + public static BlobServiceProperties fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobServiceProperties from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobServiceProperties if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceProperties. + */ + public static BlobServiceProperties fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceProperties" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobServiceProperties deserializedBlobServiceProperties = new BlobServiceProperties(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Logging".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.logging = BlobAnalyticsLogging.fromXml(reader, "Logging"); + } else if ("HourMetrics".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.hourMetrics = BlobMetrics.fromXml(reader, "HourMetrics"); + } else if ("MinuteMetrics".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.minuteMetrics = BlobMetrics.fromXml(reader, "MinuteMetrics"); + } else if ("Cors".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("CorsRule".equals(elementName.getLocalPart())) { + if (deserializedBlobServiceProperties.cors == null) { + deserializedBlobServiceProperties.cors = new ArrayList<>(); + } + deserializedBlobServiceProperties.cors.add(BlobCorsRule.fromXml(reader, "CorsRule")); + } else { + reader.skipElement(); + } + } + } else if ("DefaultServiceVersion".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.defaultServiceVersion = reader.getStringElement(); + } else if ("DeleteRetentionPolicy".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.deleteRetentionPolicy + = BlobRetentionPolicy.fromXml(reader, "DeleteRetentionPolicy"); + } else if ("StaticWebsite".equals(elementName.getLocalPart())) { + deserializedBlobServiceProperties.staticWebsite = StaticWebsite.fromXml(reader, "StaticWebsite"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobServiceProperties; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java index a71cd00475024..8d06e6aeac055 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java @@ -1,29 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Stats for the storage service. */ -@JacksonXmlRootElement(localName = "StorageServiceStats") +/** + * Stats for the storage service. + */ @Fluent -public final class BlobServiceStatistics { - +public final class BlobServiceStatistics implements XmlSerializable { /* * Geo-Replication information for the Secondary Storage Service */ - @JsonProperty(value = "GeoReplication") private GeoReplication geoReplication; - /** Creates an instance of BlobServiceStatistics class. */ - public BlobServiceStatistics() {} + /** + * Creates an instance of BlobServiceStatistics class. + */ + public BlobServiceStatistics() { + } /** * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * * @return the geoReplication value. */ public GeoReplication getGeoReplication() { @@ -32,7 +40,7 @@ public GeoReplication getGeoReplication() { /** * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * * @param geoReplication the geoReplication value to set. * @return the BlobServiceStatistics object itself. */ @@ -40,4 +48,58 @@ public BlobServiceStatistics setGeoReplication(GeoReplication geoReplication) { this.geoReplication = geoReplication; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobServiceStatistics" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeXml(this.geoReplication, "GeoReplication"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobServiceStatistics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobServiceStatistics if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceStatistics. + */ + public static BlobServiceStatistics fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobServiceStatistics from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobServiceStatistics if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobServiceStatistics. + */ + public static BlobServiceStatistics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobServiceStatistics" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobServiceStatistics deserializedBlobServiceStatistics = new BlobServiceStatistics(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("GeoReplication".equals(elementName.getLocalPart())) { + deserializedBlobServiceStatistics.geoReplication = GeoReplication.fromXml(reader, "GeoReplication"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobServiceStatistics; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java index 36ebfba4990e3..36fc0c12b6feb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java @@ -1,35 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** signed identifier. */ -@JacksonXmlRootElement(localName = "SignedIdentifier") +/** + * signed identifier. + */ @Fluent -public final class BlobSignedIdentifier { - +public final class BlobSignedIdentifier implements XmlSerializable { /* * a unique id */ - @JsonProperty(value = "Id", required = true) private String id; /* * An Access policy */ - @JsonProperty(value = "AccessPolicy", required = true) private BlobAccessPolicy accessPolicy; - /** Creates an instance of BlobSignedIdentifier class. */ - public BlobSignedIdentifier() {} + /** + * Creates an instance of BlobSignedIdentifier class. + */ + public BlobSignedIdentifier() { + } /** * Get the id property: a unique id. - * + * * @return the id value. */ public String getId() { @@ -38,7 +45,7 @@ public String getId() { /** * Set the id property: a unique id. - * + * * @param id the id value to set. * @return the BlobSignedIdentifier object itself. */ @@ -49,7 +56,7 @@ public BlobSignedIdentifier setId(String id) { /** * Get the accessPolicy property: An Access policy. - * + * * @return the accessPolicy value. */ public BlobAccessPolicy getAccessPolicy() { @@ -58,7 +65,7 @@ public BlobAccessPolicy getAccessPolicy() { /** * Set the accessPolicy property: An Access policy. - * + * * @param accessPolicy the accessPolicy value to set. * @return the BlobSignedIdentifier object itself. */ @@ -66,4 +73,62 @@ public BlobSignedIdentifier setAccessPolicy(BlobAccessPolicy accessPolicy) { this.accessPolicy = accessPolicy; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifier" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Id", this.id); + xmlWriter.writeXml(this.accessPolicy, "AccessPolicy"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobSignedIdentifier from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobSignedIdentifier if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobSignedIdentifier. + */ + public static BlobSignedIdentifier fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobSignedIdentifier from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobSignedIdentifier if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobSignedIdentifier. + */ + public static BlobSignedIdentifier fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifier" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobSignedIdentifier deserializedBlobSignedIdentifier = new BlobSignedIdentifier(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Id".equals(elementName.getLocalPart())) { + deserializedBlobSignedIdentifier.id = reader.getStringElement(); + } else if ("AccessPolicy".equals(elementName.getLocalPart())) { + deserializedBlobSignedIdentifier.accessPolicy = BlobAccessPolicy.fromXml(reader, "AccessPolicy"); + } else { + reader.skipElement(); + } + } + + return deserializedBlobSignedIdentifier; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobType.java index 06d1b805fc4a8..8e4447a018fdf 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobType.java @@ -4,21 +4,28 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for BlobType. */ +/** + * Defines values for BlobType. + */ public enum BlobType { - /** Enum value BlockBlob. */ + /** + * Enum value BlockBlob. + */ BLOCK_BLOB("BlockBlob"), - /** Enum value PageBlob. */ + /** + * Enum value PageBlob. + */ PAGE_BLOB("PageBlob"), - /** Enum value AppendBlob. */ + /** + * Enum value AppendBlob. + */ APPEND_BLOB("AppendBlob"); - /** The actual serialized value for a BlobType instance. */ + /** + * The actual serialized value for a BlobType instance. + */ private final String value; BlobType(String value) { @@ -27,11 +34,10 @@ public enum BlobType { /** * Parses a serialized value to a BlobType instance. - * + * * @param value the serialized value to parse. * @return the parsed BlobType object, or null if unable to parse. */ - @JsonCreator public static BlobType fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static BlobType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Block.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Block.java index 6cfe339729b49..2a1a4a999afeb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Block.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/Block.java @@ -4,38 +4,45 @@ package com.azure.storage.blob.models; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; + import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; -/** Represents a single block in a block blob. It describes the block's ID and size. */ -@JacksonXmlRootElement(localName = "Block") +/** + * Represents a single block in a block blob. It describes the block's ID and size. + */ @Fluent -public final class Block { +public final class Block implements XmlSerializable { /* * The base64 encoded block ID. */ - @JsonProperty(value = "Name", required = true) private String name; /* * The block size in bytes. */ - @JsonProperty(value = "Size", required = true) private long sizeLong; /* * The SizeInt property. */ - @JsonProperty(value = "SizeInt", required = true) private int sizeInt; - /** Creates an instance of Block class. */ - public Block() {} + /** + * Creates an instance of Block class. + */ + public Block() { + } /** * Get the name property: The base64 encoded block ID. - * + * * @return the name value. */ public String getName() { @@ -44,7 +51,7 @@ public String getName() { /** * Set the name property: The base64 encoded block ID. - * + * * @param name the name value to set. * @return the Block object itself. */ @@ -55,7 +62,7 @@ public Block setName(String name) { /** * Get the sizeLong property: The block size in bytes. - * + * * @return the sizeLong value. */ public long getSizeLong() { @@ -64,7 +71,7 @@ public long getSizeLong() { /** * Set the sizeLong property: The block size in bytes. - * + * * @param sizeLong the sizeLong value to set. * @return the Block object itself. */ @@ -75,7 +82,7 @@ public Block setSizeLong(long sizeLong) { /** * Get the sizeInt property: The SizeInt property. - * + * * @return the sizeInt value. * @deprecated Use {@link #getSizeLong()} */ @@ -87,7 +94,7 @@ public int getSize() { /** * Set the sizeInt property: The SizeInt property. - * + * * @param sizeInt the sizeInt value to set. * @return the Block object itself. * @deprecated Use {@link #setSizeLong(long)} @@ -98,4 +105,65 @@ public Block setSize(int sizeInt) { Block returnValue = this; return returnValue.setSizeLong((long) sizeInt); } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Block" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Name", this.name); + xmlWriter.writeLongElement("Size", this.sizeLong); + xmlWriter.writeIntElement("SizeInt", this.sizeInt); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of Block from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of Block if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the Block. + */ + public static Block fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of Block from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of Block if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the Block. + */ + public static Block fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Block" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + Block deserializedBlock = new Block(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlock.name = reader.getStringElement(); + } else if ("Size".equals(elementName.getLocalPart())) { + deserializedBlock.sizeLong = reader.getLongElement(); + } else if ("SizeInt".equals(elementName.getLocalPart())) { + deserializedBlock.sizeInt = reader.getIntElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlock; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockList.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockList.java index df724703fc295..ff7995e60a423 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockList.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockList.java @@ -5,95 +5,168 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The BlockList model. */ -@JacksonXmlRootElement(localName = "BlockList") +/** + * The BlockList model. + */ @Fluent -public final class BlockList { - private static final class CommittedBlocksWrapper { - @JacksonXmlProperty(localName = "Block") - private final List items; - - @JsonCreator - private CommittedBlocksWrapper(@JacksonXmlProperty(localName = "Block") List items) { - this.items = items; - } - } - +public final class BlockList implements XmlSerializable { /* * The CommittedBlocks property. */ - @JsonProperty(value = "CommittedBlocks") - private CommittedBlocksWrapper committedBlocks; - - private static final class UncommittedBlocksWrapper { - @JacksonXmlProperty(localName = "Block") - private final List items; - - @JsonCreator - private UncommittedBlocksWrapper(@JacksonXmlProperty(localName = "Block") List items) { - this.items = items; - } - } + private List committedBlocks; /* * The UncommittedBlocks property. */ - @JsonProperty(value = "UncommittedBlocks") - private UncommittedBlocksWrapper uncommittedBlocks; + private List uncommittedBlocks; - /** Creates an instance of BlockList class. */ - public BlockList() {} + /** + * Creates an instance of BlockList class. + */ + public BlockList() { + } /** * Get the committedBlocks property: The CommittedBlocks property. - * + * * @return the committedBlocks value. */ public List getCommittedBlocks() { if (this.committedBlocks == null) { - this.committedBlocks = new CommittedBlocksWrapper(new ArrayList()); + this.committedBlocks = new ArrayList<>(); } - return this.committedBlocks.items; + return this.committedBlocks; } /** * Set the committedBlocks property: The CommittedBlocks property. - * + * * @param committedBlocks the committedBlocks value to set. * @return the BlockList object itself. */ public BlockList setCommittedBlocks(List committedBlocks) { - this.committedBlocks = new CommittedBlocksWrapper(committedBlocks); + this.committedBlocks = committedBlocks; return this; } /** * Get the uncommittedBlocks property: The UncommittedBlocks property. - * + * * @return the uncommittedBlocks value. */ public List getUncommittedBlocks() { if (this.uncommittedBlocks == null) { - this.uncommittedBlocks = new UncommittedBlocksWrapper(new ArrayList()); + this.uncommittedBlocks = new ArrayList<>(); } - return this.uncommittedBlocks.items; + return this.uncommittedBlocks; } /** * Set the uncommittedBlocks property: The UncommittedBlocks property. - * + * * @param uncommittedBlocks the uncommittedBlocks value to set. * @return the BlockList object itself. */ public BlockList setUncommittedBlocks(List uncommittedBlocks) { - this.uncommittedBlocks = new UncommittedBlocksWrapper(uncommittedBlocks); + this.uncommittedBlocks = uncommittedBlocks; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.committedBlocks != null) { + xmlWriter.writeStartElement("CommittedBlocks"); + for (Block element : this.committedBlocks) { + xmlWriter.writeXml(element, "Block"); + } + xmlWriter.writeEndElement(); + } + if (this.uncommittedBlocks != null) { + xmlWriter.writeStartElement("UncommittedBlocks"); + for (Block element : this.uncommittedBlocks) { + xmlWriter.writeXml(element, "Block"); + } + xmlWriter.writeEndElement(); + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlockList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlockList if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockList. + */ + public static BlockList fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlockList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlockList if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockList. + */ + public static BlockList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlockList deserializedBlockList = new BlockList(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("CommittedBlocks".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Block".equals(elementName.getLocalPart())) { + if (deserializedBlockList.committedBlocks == null) { + deserializedBlockList.committedBlocks = new ArrayList<>(); + } + deserializedBlockList.committedBlocks.add(Block.fromXml(reader, "Block")); + } else { + reader.skipElement(); + } + } + } else if ("UncommittedBlocks".equals(elementName.getLocalPart())) { + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Block".equals(elementName.getLocalPart())) { + if (deserializedBlockList.uncommittedBlocks == null) { + deserializedBlockList.uncommittedBlocks = new ArrayList<>(); + } + deserializedBlockList.uncommittedBlocks.add(Block.fromXml(reader, "Block")); + } else { + reader.skipElement(); + } + } + } else { + reader.skipElement(); + } + } + + return deserializedBlockList; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockListType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockListType.java index 627243c0eafe2..1169afc1805a3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockListType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockListType.java @@ -4,21 +4,28 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for BlockListType. */ +/** + * Defines values for BlockListType. + */ public enum BlockListType { - /** Enum value committed. */ + /** + * Enum value committed. + */ COMMITTED("committed"), - /** Enum value uncommitted. */ + /** + * Enum value uncommitted. + */ UNCOMMITTED("uncommitted"), - /** Enum value all. */ + /** + * Enum value all. + */ ALL("all"); - /** The actual serialized value for a BlockListType instance. */ + /** + * The actual serialized value for a BlockListType instance. + */ private final String value; BlockListType(String value) { @@ -27,11 +34,10 @@ public enum BlockListType { /** * Parses a serialized value to a BlockListType instance. - * + * * @param value the serialized value to parse. * @return the parsed BlockListType object, or null if unable to parse. */ - @JsonCreator public static BlockListType fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static BlockListType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java index 0472532aa47ac..fc4ce4ac83f33 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlockLookupList.java @@ -5,39 +5,45 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The BlockLookupList model. */ -@JacksonXmlRootElement(localName = "BlockList") +/** + * The BlockLookupList model. + */ @Fluent -public final class BlockLookupList { +public final class BlockLookupList implements XmlSerializable { /* * The Committed property. */ - @JsonProperty("Committed") private List committed = new ArrayList<>(); /* * The Uncommitted property. */ - @JsonProperty("Uncommitted") private List uncommitted = new ArrayList<>(); /* * The Latest property. */ - @JsonProperty("Latest") private List latest = new ArrayList<>(); - /** Creates an instance of BlockLookupList class. */ - public BlockLookupList() {} + /** + * Creates an instance of BlockLookupList class. + */ + public BlockLookupList() { + } /** * Get the committed property: The Committed property. - * + * * @return the committed value. */ public List getCommitted() { @@ -46,7 +52,7 @@ public List getCommitted() { /** * Set the committed property: The Committed property. - * + * * @param committed the committed value to set. * @return the BlockLookupList object itself. */ @@ -57,7 +63,7 @@ public BlockLookupList setCommitted(List committed) { /** * Get the uncommitted property: The Uncommitted property. - * + * * @return the uncommitted value. */ public List getUncommitted() { @@ -66,7 +72,7 @@ public List getUncommitted() { /** * Set the uncommitted property: The Uncommitted property. - * + * * @param uncommitted the uncommitted value to set. * @return the BlockLookupList object itself. */ @@ -77,7 +83,7 @@ public BlockLookupList setUncommitted(List uncommitted) { /** * Get the latest property: The Latest property. - * + * * @return the latest value. */ public List getLatest() { @@ -86,7 +92,7 @@ public List getLatest() { /** * Set the latest property: The Latest property. - * + * * @param latest the latest value to set. * @return the BlockLookupList object itself. */ @@ -94,4 +100,75 @@ public BlockLookupList setLatest(List latest) { this.latest = latest; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.committed != null) { + for (String element : this.committed) { + xmlWriter.writeStringElement("Committed", element); + } + } + if (this.uncommitted != null) { + for (String element : this.uncommitted) { + xmlWriter.writeStringElement("Uncommitted", element); + } + } + if (this.latest != null) { + for (String element : this.latest) { + xmlWriter.writeStringElement("Latest", element); + } + } + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlockLookupList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlockLookupList if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockLookupList. + */ + public static BlockLookupList fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlockLookupList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlockLookupList if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlockLookupList. + */ + public static BlockLookupList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlockList" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlockLookupList deserializedBlockLookupList = new BlockLookupList(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Committed".equals(elementName.getLocalPart())) { + deserializedBlockLookupList.committed.add(reader.getStringElement()); + } else if ("Uncommitted".equals(elementName.getLocalPart())) { + deserializedBlockLookupList.uncommitted.add(reader.getStringElement()); + } else if ("Latest".equals(elementName.getLocalPart())) { + deserializedBlockLookupList.latest.add(reader.getStringElement()); + } else { + reader.skipElement(); + } + } + + return deserializedBlockLookupList; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ClearRange.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ClearRange.java index 7136590d66ed2..ec97748d11dea 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ClearRange.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ClearRange.java @@ -5,31 +5,38 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The ClearRange model. */ -@JacksonXmlRootElement(localName = "ClearRange") +/** + * The ClearRange model. + */ @Fluent -public final class ClearRange { +public final class ClearRange implements XmlSerializable { /* * The Start property. */ - @JsonProperty(value = "Start", required = true) private long start; /* * The End property. */ - @JsonProperty(value = "End", required = true) private long end; - /** Creates an instance of ClearRange class. */ - public ClearRange() {} + /** + * Creates an instance of ClearRange class. + */ + public ClearRange() { + } /** * Get the start property: The Start property. - * + * * @return the start value. */ public long getStart() { @@ -38,7 +45,7 @@ public long getStart() { /** * Set the start property: The Start property. - * + * * @param start the start value to set. * @return the ClearRange object itself. */ @@ -49,7 +56,7 @@ public ClearRange setStart(long start) { /** * Get the end property: The End property. - * + * * @return the end value. */ public long getEnd() { @@ -58,7 +65,7 @@ public long getEnd() { /** * Set the end property: The End property. - * + * * @param end the end value to set. * @return the ClearRange object itself. */ @@ -66,4 +73,62 @@ public ClearRange setEnd(long end) { this.end = end; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ClearRange" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeLongElement("Start", this.start); + xmlWriter.writeLongElement("End", this.end); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ClearRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ClearRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ClearRange. + */ + public static ClearRange fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ClearRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of ClearRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the ClearRange. + */ + public static ClearRange fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "ClearRange" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ClearRange deserializedClearRange = new ClearRange(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedClearRange.start = reader.getLongElement(); + } else if ("End".equals(elementName.getLocalPart())) { + deserializedClearRange.end = reader.getLongElement(); + } else { + reader.skipElement(); + } + } + + return deserializedClearRange; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java index f602c605dff7f..7ff46019be09f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CopyStatusType.java @@ -4,24 +4,33 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for CopyStatusType. */ +/** + * Defines values for CopyStatusType. + */ public enum CopyStatusType { - /** Enum value pending. */ + /** + * Enum value pending. + */ PENDING("pending"), - /** Enum value success. */ + /** + * Enum value success. + */ SUCCESS("success"), - /** Enum value aborted. */ + /** + * Enum value aborted. + */ ABORTED("aborted"), - /** Enum value failed. */ + /** + * Enum value failed. + */ FAILED("failed"); - /** The actual serialized value for a CopyStatusType instance. */ + /** + * The actual serialized value for a CopyStatusType instance. + */ private final String value; CopyStatusType(String value) { @@ -30,11 +39,10 @@ public enum CopyStatusType { /** * Parses a serialized value to a CopyStatusType instance. - * + * * @param value the serialized value to parse. * @return the parsed CopyStatusType object, or null if unable to parse. */ - @JsonCreator public static CopyStatusType fromString(String value) { if (value == null) { return null; @@ -48,8 +56,9 @@ public static CopyStatusType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CpkInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CpkInfo.java index 6f33b843c468e..ee03733f29ad5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CpkInfo.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/CpkInfo.java @@ -1,46 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -/** Parameter group. */ -@JacksonXmlRootElement(localName = "cpk-info") +/** + * Parameter group. + */ @Fluent public final class CpkInfo { - /* - * Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, - * encryption is performed with the root account encryption key. For more information, see Encryption at Rest for - * Azure Storage Services. + * Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, encryption is performed with the root account encryption key. For more information, see Encryption at Rest for Azure Storage Services. */ - @JsonProperty(value = "encryptionKey") private String encryptionKey; /* * The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key header is provided. */ - @JsonProperty(value = "encryptionKeySha256") private String encryptionKeySha256; /* - * The algorithm used to produce the encryption key hash. Currently, the only accepted value is "AES256". Must be - * provided if the x-ms-encryption-key header is provided. + * The algorithm used to produce the encryption key hash. Currently, the only accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. */ - @JsonProperty(value = "encryptionAlgorithm") private EncryptionAlgorithmType encryptionAlgorithm; - /** Creates an instance of CpkInfo class. */ - public CpkInfo() {} + /** + * Creates an instance of CpkInfo class. + */ + public CpkInfo() { + } /** * Get the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the * request. If not specified, encryption is performed with the root account encryption key. For more information, * see Encryption at Rest for Azure Storage Services. - * + * * @return the encryptionKey value. */ public String getEncryptionKey() { @@ -51,7 +47,7 @@ public String getEncryptionKey() { * Set the encryptionKey property: Optional. Specifies the encryption key to use to encrypt the data provided in the * request. If not specified, encryption is performed with the root account encryption key. For more information, * see Encryption at Rest for Azure Storage Services. - * + * * @param encryptionKey the encryptionKey value to set. * @return the CpkInfo object itself. */ @@ -63,7 +59,7 @@ public CpkInfo setEncryptionKey(String encryptionKey) { /** * Get the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the * x-ms-encryption-key header is provided. - * + * * @return the encryptionKeySha256 value. */ public String getEncryptionKeySha256() { @@ -73,7 +69,7 @@ public String getEncryptionKeySha256() { /** * Set the encryptionKeySha256 property: The SHA-256 hash of the provided encryption key. Must be provided if the * x-ms-encryption-key header is provided. - * + * * @param encryptionKeySha256 the encryptionKeySha256 value to set. * @return the CpkInfo object itself. */ @@ -85,7 +81,7 @@ public CpkInfo setEncryptionKeySha256(String encryptionKeySha256) { /** * Get the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. - * + * * @return the encryptionAlgorithm value. */ public EncryptionAlgorithmType getEncryptionAlgorithm() { @@ -95,7 +91,7 @@ public EncryptionAlgorithmType getEncryptionAlgorithm() { /** * Set the encryptionAlgorithm property: The algorithm used to produce the encryption key hash. Currently, the only * accepted value is "AES256". Must be provided if the x-ms-encryption-key header is provided. - * + * * @param encryptionAlgorithm the encryptionAlgorithm value to set. * @return the CpkInfo object itself. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java index 851e86e27dd58..d0905a9f3e024 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java @@ -4,18 +4,23 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for DeleteSnapshotsOptionType. */ +/** + * Defines values for DeleteSnapshotsOptionType. + */ public enum DeleteSnapshotsOptionType { - /** Enum value include. */ + /** + * Enum value include. + */ INCLUDE("include"), - /** Enum value only. */ + /** + * Enum value only. + */ ONLY("only"); - /** The actual serialized value for a DeleteSnapshotsOptionType instance. */ + /** + * The actual serialized value for a DeleteSnapshotsOptionType instance. + */ private final String value; DeleteSnapshotsOptionType(String value) { @@ -24,11 +29,10 @@ public enum DeleteSnapshotsOptionType { /** * Parses a serialized value to a DeleteSnapshotsOptionType instance. - * + * * @param value the serialized value to parse. * @return the parsed DeleteSnapshotsOptionType object, or null if unable to parse. */ - @JsonCreator public static DeleteSnapshotsOptionType fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static DeleteSnapshotsOptionType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java index d55e95bfcb71e..182cc57063a77 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java @@ -4,15 +4,18 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for EncryptionAlgorithmType. */ +/** + * Defines values for EncryptionAlgorithmType. + */ public enum EncryptionAlgorithmType { - /** Enum value AES256. */ + /** + * Enum value AES256. + */ AES256("AES256"); - /** The actual serialized value for a EncryptionAlgorithmType instance. */ + /** + * The actual serialized value for a EncryptionAlgorithmType instance. + */ private final String value; EncryptionAlgorithmType(String value) { @@ -21,11 +24,10 @@ public enum EncryptionAlgorithmType { /** * Parses a serialized value to a EncryptionAlgorithmType instance. - * + * * @param value the serialized value to parse. * @return the parsed EncryptionAlgorithmType object, or null if unable to parse. */ - @JsonCreator public static EncryptionAlgorithmType fromString(String value) { if (value == null) { return null; @@ -39,8 +41,9 @@ public static EncryptionAlgorithmType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java index 8469447422654..c1bf0973ca64a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplication.java @@ -5,34 +5,41 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.time.OffsetDateTime; +import java.util.Objects; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Geo-Replication information for the Secondary Storage Service. */ -@JacksonXmlRootElement(localName = "GeoReplication") +/** + * Geo-Replication information for the Secondary Storage Service. + */ @Fluent -public final class GeoReplication { +public final class GeoReplication implements XmlSerializable { /* * The status of the secondary location */ - @JsonProperty(value = "Status", required = true) private GeoReplicationStatus status; /* - * A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for - * read operations at the secondary. Primary writes after this point in time may or may not be available for reads. + * A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or may not be available for reads. */ - @JsonProperty(value = "LastSyncTime", required = true) private DateTimeRfc1123 lastSyncTime; - /** Creates an instance of GeoReplication class. */ - public GeoReplication() {} + /** + * Creates an instance of GeoReplication class. + */ + public GeoReplication() { + } /** * Get the status property: The status of the secondary location. - * + * * @return the status value. */ public GeoReplicationStatus getStatus() { @@ -41,7 +48,7 @@ public GeoReplicationStatus getStatus() { /** * Set the status property: The status of the secondary location. - * + * * @param status the status value to set. * @return the GeoReplication object itself. */ @@ -54,7 +61,7 @@ public GeoReplication setStatus(GeoReplicationStatus status) { * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or * may not be available for reads. - * + * * @return the lastSyncTime value. */ public OffsetDateTime getLastSyncTime() { @@ -68,7 +75,7 @@ public OffsetDateTime getLastSyncTime() { * Set the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or * may not be available for reads. - * + * * @param lastSyncTime the lastSyncTime value to set. * @return the GeoReplication object itself. */ @@ -80,4 +87,62 @@ public GeoReplication setLastSyncTime(OffsetDateTime lastSyncTime) { } return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "GeoReplication" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Status", this.status == null ? null : this.status.toString()); + xmlWriter.writeStringElement("LastSyncTime", Objects.toString(this.lastSyncTime, null)); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of GeoReplication from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of GeoReplication if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the GeoReplication. + */ + public static GeoReplication fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of GeoReplication from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of GeoReplication if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the GeoReplication. + */ + public static GeoReplication fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "GeoReplication" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + GeoReplication deserializedGeoReplication = new GeoReplication(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Status".equals(elementName.getLocalPart())) { + deserializedGeoReplication.status = GeoReplicationStatus.fromString(reader.getStringElement()); + } else if ("LastSyncTime".equals(elementName.getLocalPart())) { + deserializedGeoReplication.lastSyncTime = reader.getNullableElement(DateTimeRfc1123::new); + } else { + reader.skipElement(); + } + } + + return deserializedGeoReplication; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java index 7461b9c4bdc2b..e64825b6e7f82 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java @@ -5,42 +5,49 @@ package com.azure.storage.blob.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of the secondary location. */ +/** + * The status of the secondary location. + */ public final class GeoReplicationStatus extends ExpandableStringEnum { - /** Static value live for GeoReplicationStatus. */ + /** + * Static value live for GeoReplicationStatus. + */ public static final GeoReplicationStatus LIVE = fromString("live"); - /** Static value bootstrap for GeoReplicationStatus. */ + /** + * Static value bootstrap for GeoReplicationStatus. + */ public static final GeoReplicationStatus BOOTSTRAP = fromString("bootstrap"); - /** Static value unavailable for GeoReplicationStatus. */ + /** + * Static value unavailable for GeoReplicationStatus. + */ public static final GeoReplicationStatus UNAVAILABLE = fromString("unavailable"); /** * Creates a new instance of GeoReplicationStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public GeoReplicationStatus() {} + public GeoReplicationStatus() { + } /** * Creates or finds a GeoReplicationStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding GeoReplicationStatus. */ - @JsonCreator public static GeoReplicationStatus fromString(String name) { return fromString(name, GeoReplicationStatus.class); } /** * Gets known GeoReplicationStatus values. - * + * * @return known GeoReplicationStatus values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java index c7335e5444fb2..722161e901a29 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/KeyInfo.java @@ -5,31 +5,38 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** Key information. */ -@JacksonXmlRootElement(localName = "KeyInfo") +/** + * Key information. + */ @Fluent -public final class KeyInfo { +public final class KeyInfo implements XmlSerializable { /* * The date-time the key is active in ISO 8601 UTC time */ - @JsonProperty(value = "Start", required = true) private String start; /* * The date-time the key expires in ISO 8601 UTC time */ - @JsonProperty(value = "Expiry", required = true) private String expiry; - /** Creates an instance of KeyInfo class. */ - public KeyInfo() {} + /** + * Creates an instance of KeyInfo class. + */ + public KeyInfo() { + } /** * Get the start property: The date-time the key is active in ISO 8601 UTC time. - * + * * @return the start value. */ public String getStart() { @@ -38,7 +45,7 @@ public String getStart() { /** * Set the start property: The date-time the key is active in ISO 8601 UTC time. - * + * * @param start the start value to set. * @return the KeyInfo object itself. */ @@ -49,7 +56,7 @@ public KeyInfo setStart(String start) { /** * Get the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * * @return the expiry value. */ public String getExpiry() { @@ -58,7 +65,7 @@ public String getExpiry() { /** * Set the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * * @param expiry the expiry value to set. * @return the KeyInfo object itself. */ @@ -66,4 +73,62 @@ public KeyInfo setExpiry(String expiry) { this.expiry = expiry; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "KeyInfo" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("Start", this.start); + xmlWriter.writeStringElement("Expiry", this.expiry); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + public static KeyInfo fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of KeyInfo from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of KeyInfo if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the KeyInfo. + */ + public static KeyInfo fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "KeyInfo" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + KeyInfo deserializedKeyInfo = new KeyInfo(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedKeyInfo.start = reader.getStringElement(); + } else if ("Expiry".equals(elementName.getLocalPart())) { + deserializedKeyInfo.expiry = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedKeyInfo; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java index f2034a9356245..ce5ac31938a78 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseDurationType.java @@ -4,18 +4,23 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for LeaseDurationType. */ +/** + * Defines values for LeaseDurationType. + */ public enum LeaseDurationType { - /** Enum value infinite. */ + /** + * Enum value infinite. + */ INFINITE("infinite"), - /** Enum value fixed. */ + /** + * Enum value fixed. + */ FIXED("fixed"); - /** The actual serialized value for a LeaseDurationType instance. */ + /** + * The actual serialized value for a LeaseDurationType instance. + */ private final String value; LeaseDurationType(String value) { @@ -24,11 +29,10 @@ public enum LeaseDurationType { /** * Parses a serialized value to a LeaseDurationType instance. - * + * * @param value the serialized value to parse. * @return the parsed LeaseDurationType object, or null if unable to parse. */ - @JsonCreator public static LeaseDurationType fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static LeaseDurationType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java index 2e6e42b0e349a..c76a09b519fb3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStateType.java @@ -4,27 +4,38 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for LeaseStateType. */ +/** + * Defines values for LeaseStateType. + */ public enum LeaseStateType { - /** Enum value available. */ + /** + * Enum value available. + */ AVAILABLE("available"), - /** Enum value leased. */ + /** + * Enum value leased. + */ LEASED("leased"), - /** Enum value expired. */ + /** + * Enum value expired. + */ EXPIRED("expired"), - /** Enum value breaking. */ + /** + * Enum value breaking. + */ BREAKING("breaking"), - /** Enum value broken. */ + /** + * Enum value broken. + */ BROKEN("broken"); - /** The actual serialized value for a LeaseStateType instance. */ + /** + * The actual serialized value for a LeaseStateType instance. + */ private final String value; LeaseStateType(String value) { @@ -33,11 +44,10 @@ public enum LeaseStateType { /** * Parses a serialized value to a LeaseStateType instance. - * + * * @param value the serialized value to parse. * @return the parsed LeaseStateType object, or null if unable to parse. */ - @JsonCreator public static LeaseStateType fromString(String value) { if (value == null) { return null; @@ -51,8 +61,9 @@ public static LeaseStateType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java index ccadde1cef7ae..2de9c2c873627 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/LeaseStatusType.java @@ -4,18 +4,23 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for LeaseStatusType. */ +/** + * Defines values for LeaseStatusType. + */ public enum LeaseStatusType { - /** Enum value locked. */ + /** + * Enum value locked. + */ LOCKED("locked"), - /** Enum value unlocked. */ + /** + * Enum value unlocked. + */ UNLOCKED("unlocked"); - /** The actual serialized value for a LeaseStatusType instance. */ + /** + * The actual serialized value for a LeaseStatusType instance. + */ private final String value; LeaseStatusType(String value) { @@ -24,11 +29,10 @@ public enum LeaseStatusType { /** * Parses a serialized value to a LeaseStatusType instance. - * + * * @param value the serialized value to parse. * @return the parsed LeaseStatusType object, or null if unable to parse. */ - @JsonCreator public static LeaseStatusType fromString(String value) { if (value == null) { return null; @@ -42,8 +46,9 @@ public static LeaseStatusType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java index d56bba1fb38b6..9615a6ce401be 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java @@ -4,21 +4,28 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ListBlobContainersIncludeType. */ +/** + * Defines values for ListBlobContainersIncludeType. + */ public enum ListBlobContainersIncludeType { - /** Enum value metadata. */ + /** + * Enum value metadata. + */ METADATA("metadata"), - /** Enum value deleted. */ + /** + * Enum value deleted. + */ DELETED("deleted"), - /** Enum value system. */ + /** + * Enum value system. + */ SYSTEM("system"); - /** The actual serialized value for a ListBlobContainersIncludeType instance. */ + /** + * The actual serialized value for a ListBlobContainersIncludeType instance. + */ private final String value; ListBlobContainersIncludeType(String value) { @@ -27,11 +34,10 @@ public enum ListBlobContainersIncludeType { /** * Parses a serialized value to a ListBlobContainersIncludeType instance. - * + * * @param value the serialized value to parse. * @return the parsed ListBlobContainersIncludeType object, or null if unable to parse. */ - @JsonCreator public static ListBlobContainersIncludeType fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static ListBlobContainersIncludeType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java index 80607a013b238..975ec377007b5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java @@ -4,42 +4,63 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ListBlobsIncludeItem. */ +/** + * Defines values for ListBlobsIncludeItem. + */ public enum ListBlobsIncludeItem { - /** Enum value copy. */ + /** + * Enum value copy. + */ COPY("copy"), - /** Enum value deleted. */ + /** + * Enum value deleted. + */ DELETED("deleted"), - /** Enum value metadata. */ + /** + * Enum value metadata. + */ METADATA("metadata"), - /** Enum value snapshots. */ + /** + * Enum value snapshots. + */ SNAPSHOTS("snapshots"), - /** Enum value uncommittedblobs. */ + /** + * Enum value uncommittedblobs. + */ UNCOMMITTEDBLOBS("uncommittedblobs"), - /** Enum value versions. */ + /** + * Enum value versions. + */ VERSIONS("versions"), - /** Enum value tags. */ + /** + * Enum value tags. + */ TAGS("tags"), - /** Enum value immutabilitypolicy. */ + /** + * Enum value immutabilitypolicy. + */ IMMUTABILITY_POLICY("immutabilitypolicy"), - /** Enum value legalhold. */ + /** + * Enum value legalhold. + */ LEGAL_HOLD("legalhold"), - /** Enum value deletedwithversions. */ + /** + * Enum value deletedwithversions. + */ DELETED_WITH_VERSIONS("deletedwithversions"); - /** The actual serialized value for a ListBlobsIncludeItem instance. */ + /** + * The actual serialized value for a ListBlobsIncludeItem instance. + */ private final String value; ListBlobsIncludeItem(String value) { @@ -48,11 +69,10 @@ public enum ListBlobsIncludeItem { /** * Parses a serialized value to a ListBlobsIncludeItem instance. - * + * * @param value the serialized value to parse. * @return the parsed ListBlobsIncludeItem object, or null if unable to parse. */ - @JsonCreator public static ListBlobsIncludeItem fromString(String value) { if (value == null) { return null; @@ -66,8 +86,9 @@ public static ListBlobsIncludeItem fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java index fca362e931f28..edbaf8c2e590a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageList.java @@ -4,55 +4,58 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.azure.storage.blob.implementation.models.PageListHelper; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.util.ArrayList; import java.util.List; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; +import com.azure.storage.blob.implementation.models.PageListHelper; -/** the list of pages. */ -@JacksonXmlRootElement(localName = "PageList") +/** + * the list of pages. + */ @Fluent -@JsonDeserialize(using = PageListDeserializer.class) -public final class PageList { +public final class PageList implements XmlSerializable { static { - PageListHelper.setAccessor( - new PageListHelper.PageListAccessor() { - - @Override - public String getNextMarker(PageList pageList) { - return pageList.getNextMarker(); - } - - @Override - public PageList setNextMarker(PageList pageList, String marker) { - return pageList.setNextMarker(marker); - } - }); + PageListHelper.setAccessor(new PageListHelper.PageListAccessor() { + + @Override + public String getNextMarker(PageList pageList) { + return pageList.getNextMarker(); + } + + @Override + public PageList setNextMarker(PageList pageList, String marker) { + return pageList.setNextMarker(marker); + } + }); } /* * The PageRange property. */ - @JsonProperty("PageRange") private List pageRange = new ArrayList<>(); /* * The ClearRange property. */ - @JsonProperty("ClearRange") private List clearRange = new ArrayList<>(); /* * The NextMarker property. */ - @JsonProperty(value = "NextMarker") private String nextMarker; - /** Creates an instance of PageList class. */ - public PageList() {} + /** + * Creates an instance of PageList class. + */ + public PageList() { + } /** * Get the pageRange property: The PageRange property. @@ -113,4 +116,69 @@ private PageList setNextMarker(String nextMarker) { this.nextMarker = nextMarker; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.pageRange != null) { + for (PageRange element : this.pageRange) { + xmlWriter.writeXml(element, "PageRange"); + } + } + if (this.clearRange != null) { + for (ClearRange element : this.clearRange) { + xmlWriter.writeXml(element, "ClearRange"); + } + } + xmlWriter.writeStringElement("NextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of PageList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of PageList if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the PageList. + */ + public static PageList fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of PageList from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of PageList if the XmlReader was pointing to an instance of it, or null if it was pointing to + * XML null. + * @throws XMLStreamException If an error occurs while reading the PageList. + */ + public static PageList fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + PageList deserializedPageList = new PageList(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + if ("PageRange".equals(elementName.getLocalPart())) { + deserializedPageList.pageRange.add(PageRange.fromXml(reader, "PageRange")); + } else if ("ClearRange".equals(elementName.getLocalPart())) { + deserializedPageList.clearRange.add(ClearRange.fromXml(reader, "ClearRange")); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedPageList.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + return deserializedPageList; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRange.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRange.java index cf57e6c0259f3..fe0c48709b8eb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRange.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageRange.java @@ -5,31 +5,38 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The PageRange model. */ -@JacksonXmlRootElement(localName = "PageRange") +/** + * The PageRange model. + */ @Fluent -public final class PageRange { +public final class PageRange implements XmlSerializable { /* * The Start property. */ - @JsonProperty(value = "Start", required = true) private long start; /* * The End property. */ - @JsonProperty(value = "End", required = true) private long end; - /** Creates an instance of PageRange class. */ - public PageRange() {} + /** + * Creates an instance of PageRange class. + */ + public PageRange() { + } /** * Get the start property: The Start property. - * + * * @return the start value. */ public long getStart() { @@ -38,7 +45,7 @@ public long getStart() { /** * Set the start property: The Start property. - * + * * @param start the start value to set. * @return the PageRange object itself. */ @@ -49,7 +56,7 @@ public PageRange setStart(long start) { /** * Get the end property: The End property. - * + * * @return the end value. */ public long getEnd() { @@ -58,7 +65,7 @@ public long getEnd() { /** * Set the end property: The End property. - * + * * @param end the end value to set. * @return the PageRange object itself. */ @@ -66,4 +73,62 @@ public PageRange setEnd(long end) { this.end = end; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageRange" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeLongElement("Start", this.start); + xmlWriter.writeLongElement("End", this.end); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of PageRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of PageRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the PageRange. + */ + public static PageRange fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of PageRange from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of PageRange if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the PageRange. + */ + public static PageRange fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageRange" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + PageRange deserializedPageRange = new PageRange(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Start".equals(elementName.getLocalPart())) { + deserializedPageRange.start = reader.getLongElement(); + } else if ("End".equals(elementName.getLocalPart())) { + deserializedPageRange.end = reader.getLongElement(); + } else { + reader.skipElement(); + } + } + + return deserializedPageRange; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java index 8c6c71dd2e8b2..af78698cce78d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PublicAccessType.java @@ -5,39 +5,44 @@ package com.azure.storage.blob.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PublicAccessType. */ +/** + * Defines values for PublicAccessType. + */ public final class PublicAccessType extends ExpandableStringEnum { - /** Static value container for PublicAccessType. */ + /** + * Static value container for PublicAccessType. + */ public static final PublicAccessType CONTAINER = fromString("container"); - /** Static value blob for PublicAccessType. */ + /** + * Static value blob for PublicAccessType. + */ public static final PublicAccessType BLOB = fromString("blob"); /** * Creates a new instance of PublicAccessType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public PublicAccessType() {} + public PublicAccessType() { + } /** * Creates or finds a PublicAccessType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PublicAccessType. */ - @JsonCreator public static PublicAccessType fromString(String name) { return fromString(name, PublicAccessType.class); } /** * Gets known PublicAccessType values. - * + * * @return known PublicAccessType values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java index 6827081240b89..69d05855c0465 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/RehydratePriority.java @@ -5,7 +5,6 @@ package com.azure.storage.blob.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,34 +12,38 @@ * High and Standard. */ public final class RehydratePriority extends ExpandableStringEnum { - /** Static value High for RehydratePriority. */ + /** + * Static value High for RehydratePriority. + */ public static final RehydratePriority HIGH = fromString("High"); - /** Static value Standard for RehydratePriority. */ + /** + * Static value Standard for RehydratePriority. + */ public static final RehydratePriority STANDARD = fromString("Standard"); /** * Creates a new instance of RehydratePriority value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public RehydratePriority() {} + public RehydratePriority() { + } /** * Creates or finds a RehydratePriority from its string representation. - * + * * @param name a name to look for. * @return the corresponding RehydratePriority. */ - @JsonCreator public static RehydratePriority fromString(String name) { return fromString(name, RehydratePriority.class); } /** * Gets known RehydratePriority values. - * + * * @return known RehydratePriority values. */ public static Collection values() { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java index c8eb514c82f35..b53fe1e30289f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java @@ -4,21 +4,28 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SequenceNumberActionType. */ +/** + * Defines values for SequenceNumberActionType. + */ public enum SequenceNumberActionType { - /** Enum value max. */ + /** + * Enum value max. + */ MAX("max"), - /** Enum value update. */ + /** + * Enum value update. + */ UPDATE("update"), - /** Enum value increment. */ + /** + * Enum value increment. + */ INCREMENT("increment"); - /** The actual serialized value for a SequenceNumberActionType instance. */ + /** + * The actual serialized value for a SequenceNumberActionType instance. + */ private final String value; SequenceNumberActionType(String value) { @@ -27,11 +34,10 @@ public enum SequenceNumberActionType { /** * Parses a serialized value to a SequenceNumberActionType instance. - * + * * @param value the serialized value to parse. * @return the parsed SequenceNumberActionType object, or null if unable to parse. */ - @JsonCreator public static SequenceNumberActionType fromString(String value) { if (value == null) { return null; @@ -45,8 +51,9 @@ public static SequenceNumberActionType fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SkuName.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SkuName.java index 1ae80ede1976a..bab2c5e601f7c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SkuName.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SkuName.java @@ -4,27 +4,38 @@ package com.azure.storage.blob.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SkuName. */ +/** + * Defines values for SkuName. + */ public enum SkuName { - /** Enum value Standard_LRS. */ + /** + * Enum value Standard_LRS. + */ STANDARD_LRS("Standard_LRS"), - /** Enum value Standard_GRS. */ + /** + * Enum value Standard_GRS. + */ STANDARD_GRS("Standard_GRS"), - /** Enum value Standard_RAGRS. */ + /** + * Enum value Standard_RAGRS. + */ STANDARD_RAGRS("Standard_RAGRS"), - /** Enum value Standard_ZRS. */ + /** + * Enum value Standard_ZRS. + */ STANDARD_ZRS("Standard_ZRS"), - /** Enum value Premium_LRS. */ + /** + * Enum value Premium_LRS. + */ PREMIUM_LRS("Premium_LRS"); - /** The actual serialized value for a SkuName instance. */ + /** + * The actual serialized value for a SkuName instance. + */ private final String value; SkuName(String value) { @@ -33,11 +44,10 @@ public enum SkuName { /** * Parses a serialized value to a SkuName instance. - * + * * @param value the serialized value to parse. * @return the parsed SkuName object, or null if unable to parse. */ - @JsonCreator public static SkuName fromString(String value) { if (value == null) { return null; @@ -51,8 +61,9 @@ public static SkuName fromString(String value) { return null; } - /** {@inheritDoc} */ - @JsonValue + /** + * {@inheritDoc} + */ @Override public String toString() { return this.value; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java index d7c496adc6440..c62b44c36a927 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/StaticWebsite.java @@ -5,43 +5,48 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** The properties that enable an account to host a static website. */ -@JacksonXmlRootElement(localName = "StaticWebsite") +/** + * The properties that enable an account to host a static website. + */ @Fluent -public final class StaticWebsite { +public final class StaticWebsite implements XmlSerializable { /* * Indicates whether this account is hosting a static website */ - @JsonProperty(value = "Enabled", required = true) private boolean enabled; /* * The default name of the index page under each directory */ - @JsonProperty(value = "IndexDocument") private String indexDocument; /* * The absolute path of the custom 404 page */ - @JsonProperty(value = "ErrorDocument404Path") private String errorDocument404Path; /* * Absolute path of the default index page */ - @JsonProperty(value = "DefaultIndexDocumentPath") private String defaultIndexDocumentPath; - /** Creates an instance of StaticWebsite class. */ - public StaticWebsite() {} + /** + * Creates an instance of StaticWebsite class. + */ + public StaticWebsite() { + } /** * Get the enabled property: Indicates whether this account is hosting a static website. - * + * * @return the enabled value. */ public boolean isEnabled() { @@ -50,7 +55,7 @@ public boolean isEnabled() { /** * Set the enabled property: Indicates whether this account is hosting a static website. - * + * * @param enabled the enabled value to set. * @return the StaticWebsite object itself. */ @@ -61,7 +66,7 @@ public StaticWebsite setEnabled(boolean enabled) { /** * Get the indexDocument property: The default name of the index page under each directory. - * + * * @return the indexDocument value. */ public String getIndexDocument() { @@ -70,7 +75,7 @@ public String getIndexDocument() { /** * Set the indexDocument property: The default name of the index page under each directory. - * + * * @param indexDocument the indexDocument value to set. * @return the StaticWebsite object itself. */ @@ -81,7 +86,7 @@ public StaticWebsite setIndexDocument(String indexDocument) { /** * Get the errorDocument404Path property: The absolute path of the custom 404 page. - * + * * @return the errorDocument404Path value. */ public String getErrorDocument404Path() { @@ -90,7 +95,7 @@ public String getErrorDocument404Path() { /** * Set the errorDocument404Path property: The absolute path of the custom 404 page. - * + * * @param errorDocument404Path the errorDocument404Path value to set. * @return the StaticWebsite object itself. */ @@ -101,7 +106,7 @@ public StaticWebsite setErrorDocument404Path(String errorDocument404Path) { /** * Get the defaultIndexDocumentPath property: Absolute path of the default index page. - * + * * @return the defaultIndexDocumentPath value. */ public String getDefaultIndexDocumentPath() { @@ -110,7 +115,7 @@ public String getDefaultIndexDocumentPath() { /** * Set the defaultIndexDocumentPath property: Absolute path of the default index page. - * + * * @param defaultIndexDocumentPath the defaultIndexDocumentPath value to set. * @return the StaticWebsite object itself. */ @@ -118,4 +123,68 @@ public StaticWebsite setDefaultIndexDocumentPath(String defaultIndexDocumentPath this.defaultIndexDocumentPath = defaultIndexDocumentPath; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StaticWebsite" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeBooleanElement("Enabled", this.enabled); + xmlWriter.writeStringElement("IndexDocument", this.indexDocument); + xmlWriter.writeStringElement("ErrorDocument404Path", this.errorDocument404Path); + xmlWriter.writeStringElement("DefaultIndexDocumentPath", this.defaultIndexDocumentPath); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of StaticWebsite from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of StaticWebsite if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the StaticWebsite. + */ + public static StaticWebsite fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of StaticWebsite from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of StaticWebsite if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the StaticWebsite. + */ + public static StaticWebsite fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StaticWebsite" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + StaticWebsite deserializedStaticWebsite = new StaticWebsite(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Enabled".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.enabled = reader.getBooleanElement(); + } else if ("IndexDocument".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.indexDocument = reader.getStringElement(); + } else if ("ErrorDocument404Path".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.errorDocument404Path = reader.getStringElement(); + } else if ("DefaultIndexDocumentPath".equals(elementName.getLocalPart())) { + deserializedStaticWebsite.defaultIndexDocumentPath = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedStaticWebsite; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java index d9c073015f8b4..daed651c8005c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/UserDelegationKey.java @@ -5,62 +5,65 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; -/** A user delegation key. */ -@JacksonXmlRootElement(localName = "UserDelegationKey") +/** + * A user delegation key. + */ @Fluent -public final class UserDelegationKey { +public final class UserDelegationKey implements XmlSerializable { /* * The Azure Active Directory object ID in GUID format. */ - @JsonProperty(value = "SignedOid", required = true) private String signedObjectId; /* * The Azure Active Directory tenant ID in GUID format */ - @JsonProperty(value = "SignedTid", required = true) private String signedTenantId; /* * The date-time the key is active */ - @JsonProperty(value = "SignedStart", required = true) private OffsetDateTime signedStart; /* * The date-time the key expires */ - @JsonProperty(value = "SignedExpiry", required = true) private OffsetDateTime signedExpiry; /* * Abbreviation of the Azure Storage service that accepts the key */ - @JsonProperty(value = "SignedService", required = true) private String signedService; /* * The service version that created the key */ - @JsonProperty(value = "SignedVersion", required = true) private String signedVersion; /* * The key as a base64 string */ - @JsonProperty(value = "Value", required = true) private String value; - /** Creates an instance of UserDelegationKey class. */ - public UserDelegationKey() {} + /** + * Creates an instance of UserDelegationKey class. + */ + public UserDelegationKey() { + } /** * Get the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * * @return the signedObjectId value. */ public String getSignedObjectId() { @@ -69,7 +72,7 @@ public String getSignedObjectId() { /** * Set the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * * @param signedObjectId the signedObjectId value to set. * @return the UserDelegationKey object itself. */ @@ -80,7 +83,7 @@ public UserDelegationKey setSignedObjectId(String signedObjectId) { /** * Get the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * * @return the signedTenantId value. */ public String getSignedTenantId() { @@ -89,7 +92,7 @@ public String getSignedTenantId() { /** * Set the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * * @param signedTenantId the signedTenantId value to set. * @return the UserDelegationKey object itself. */ @@ -100,7 +103,7 @@ public UserDelegationKey setSignedTenantId(String signedTenantId) { /** * Get the signedStart property: The date-time the key is active. - * + * * @return the signedStart value. */ public OffsetDateTime getSignedStart() { @@ -109,7 +112,7 @@ public OffsetDateTime getSignedStart() { /** * Set the signedStart property: The date-time the key is active. - * + * * @param signedStart the signedStart value to set. * @return the UserDelegationKey object itself. */ @@ -120,7 +123,7 @@ public UserDelegationKey setSignedStart(OffsetDateTime signedStart) { /** * Get the signedExpiry property: The date-time the key expires. - * + * * @return the signedExpiry value. */ public OffsetDateTime getSignedExpiry() { @@ -129,7 +132,7 @@ public OffsetDateTime getSignedExpiry() { /** * Set the signedExpiry property: The date-time the key expires. - * + * * @param signedExpiry the signedExpiry value to set. * @return the UserDelegationKey object itself. */ @@ -140,7 +143,7 @@ public UserDelegationKey setSignedExpiry(OffsetDateTime signedExpiry) { /** * Get the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * * @return the signedService value. */ public String getSignedService() { @@ -149,7 +152,7 @@ public String getSignedService() { /** * Set the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * * @param signedService the signedService value to set. * @return the UserDelegationKey object itself. */ @@ -160,7 +163,7 @@ public UserDelegationKey setSignedService(String signedService) { /** * Get the signedVersion property: The service version that created the key. - * + * * @return the signedVersion value. */ public String getSignedVersion() { @@ -169,7 +172,7 @@ public String getSignedVersion() { /** * Set the signedVersion property: The service version that created the key. - * + * * @param signedVersion the signedVersion value to set. * @return the UserDelegationKey object itself. */ @@ -180,7 +183,7 @@ public UserDelegationKey setSignedVersion(String signedVersion) { /** * Get the value property: The key as a base64 string. - * + * * @return the value value. */ public String getValue() { @@ -189,7 +192,7 @@ public String getValue() { /** * Set the value property: The key as a base64 string. - * + * * @param value the value value to set. * @return the UserDelegationKey object itself. */ @@ -197,4 +200,81 @@ public UserDelegationKey setValue(String value) { this.value = value; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "UserDelegationKey" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeStringElement("SignedOid", this.signedObjectId); + xmlWriter.writeStringElement("SignedTid", this.signedTenantId); + xmlWriter.writeStringElement("SignedStart", + this.signedStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedStart)); + xmlWriter.writeStringElement("SignedExpiry", + this.signedExpiry == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.signedExpiry)); + xmlWriter.writeStringElement("SignedService", this.signedService); + xmlWriter.writeStringElement("SignedVersion", this.signedVersion); + xmlWriter.writeStringElement("Value", this.value); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + public static UserDelegationKey fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of UserDelegationKey from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of UserDelegationKey if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the UserDelegationKey. + */ + public static UserDelegationKey fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "UserDelegationKey" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + UserDelegationKey deserializedUserDelegationKey = new UserDelegationKey(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("SignedOid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedObjectId = reader.getStringElement(); + } else if ("SignedTid".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedTenantId = reader.getStringElement(); + } else if ("SignedStart".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedStart + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); + } else if ("SignedExpiry".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedExpiry + = reader.getNullableElement(dateString -> OffsetDateTime.parse(dateString)); + } else if ("SignedService".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedService = reader.getStringElement(); + } else if ("SignedVersion".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.signedVersion = reader.getStringElement(); + } else if ("Value".equals(elementName.getLocalPart())) { + deserializedUserDelegationKey.value = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedUserDelegationKey; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/package-info.java index 6a2220d586eef..0680e6d4bbc6d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for AzureBlobStorage. null. */ +/** + * Package containing the data models for AzureBlobStorage. + * null. + */ package com.azure.storage.blob.models; diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 73ff2a71122ba..930759ab0a8bf 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -15,16 +15,16 @@ autorest ### Code generation settings ``` yaml -use: '@autorest/java@4.1.16' +use: '@autorest/java@4.1.29' input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/ccefad16baad361096d997888ef8ff8503118fac/specification/storage/data-plane/Microsoft.BlobStorage/stable/2024-08-04/blob.json java: true output-folder: ../ namespace: com.azure.storage.blob -enable-xml: true generate-client-as-impl: true generate-client-interfaces: false service-interface-as-public: true license-header: MICROSOFT_MIT_SMALL +enable-sync-stack: true context-client-method-parameter: true optional-constant-as-enum: true default-http-exception-type: com.azure.storage.blob.models.BlobStorageException @@ -35,6 +35,8 @@ customization-class: src/main/java/BlobStorageCustomization.java generic-response-type: true use-input-stream-for-binary: true no-custom-headers: true +disable-client-builder: true +stream-style-serialization: true ``` ### /{containerName}/{blob} diff --git a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java index 92601a5b28e81..5fbe4795e4c2d 100644 --- a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java +++ b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java @@ -21,19 +21,15 @@ public void customize(LibraryCustomization customization, Logger logger) { // Implementation models customizations PackageCustomization implementationModels = customization.getPackage("com.azure.storage.blob.implementation.models"); - implementationModels.getClass("BlobHierarchyListSegment").addAnnotation("@JsonDeserialize(using = com.azure.storage.blob.implementation.util.CustomHierarchicalListingDeserializer.class)"); // Models customizations PackageCustomization models = customization.getPackage("com.azure.storage.blob.models"); models.getClass("PageList").customizeAst(ast -> { - ast.addImport("com.fasterxml.jackson.databind.annotation.JsonDeserialize") - .addImport("com.azure.storage.blob.implementation.models.PageListHelper"); + ast.addImport("com.azure.storage.blob.implementation.models.PageListHelper"); ClassOrInterfaceDeclaration clazz = ast.getClassByName("PageList").get(); - clazz.addAnnotation(StaticJavaParser.parseAnnotation("@JsonDeserialize(using = PageListDeserializer.class)")); - clazz.getMethodsByName("getNextMarker").get(0).setModifiers(com.github.javaparser.ast.Modifier.Keyword.PRIVATE); clazz.getMethodsByName("setNextMarker").get(0).setModifiers(com.github.javaparser.ast.Modifier.Keyword.PRIVATE); @@ -59,19 +55,6 @@ public void customize(LibraryCustomization customization, Logger logger) { blobContainerEncryptionScope.getMethod("isEncryptionScopeOverridePrevented") .setReturnType("boolean", "return Boolean.TRUE.equals(%s);", true); - // Changes to JacksonXmlRootElement for classes that aren't serialized to maintain backwards compatibility. - changeJacksonXmlRootElementName(models.getClass("BlobHttpHeaders"), "blob-http-headers"); - changeJacksonXmlRootElementName(blobContainerEncryptionScope, "blob-container-encryption-scope"); - changeJacksonXmlRootElementName(models.getClass("CpkInfo"), "cpk-info"); - - // Changes to JacksonXmlRootElement for classes that have been renamed. - changeJacksonXmlRootElementName(models.getClass("BlobMetrics"), "Metrics"); - changeJacksonXmlRootElementName(models.getClass("BlobAnalyticsLogging"), "Logging"); - changeJacksonXmlRootElementName(models.getClass("BlobRetentionPolicy"), "RetentionPolicy"); - changeJacksonXmlRootElementName(models.getClass("BlobServiceStatistics"), "StorageServiceStats"); - changeJacksonXmlRootElementName(models.getClass("BlobSignedIdentifier"), "SignedIdentifier"); - changeJacksonXmlRootElementName(models.getClass("BlobAccessPolicy"), "AccessPolicy"); - ClassCustomization blobContainerItemProperties = models.getClass("BlobContainerItemProperties"); blobContainerItemProperties.getMethod("isEncryptionScopeOverridePrevented") .setReturnType("boolean", "return Boolean.TRUE.equals(%s);", true); @@ -115,19 +98,125 @@ public void customize(LibraryCustomization customization, Logger logger) { .getJavadoc() .setDeprecated("Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED}"); + //QueryFormat + ClassCustomization queryFormat = implementationModels.getClass("QueryFormat"); + customizeQueryFormat(queryFormat); + + //BlobHierarchyListSegment + ClassCustomization blobHierarchyListSegment = implementationModels.getClass("BlobHierarchyListSegment"); + customizeBlobHierarchyListSegment(blobHierarchyListSegment); + + //BlobFlatListSegment + ClassCustomization blobFlatListSegment = implementationModels.getClass("BlobFlatListSegment"); + customizeBlobFlatListSegment(blobFlatListSegment); + } + private static void customizeQueryFormat(ClassCustomization classCustomization) { + String fileContent = classCustomization.getEditor().getFileContent(classCustomization.getFileName()); + fileContent = fileContent.replace("xmlWriter.nullElement(\"ParquetTextConfiguration\", this.parquetTextConfiguration);", + "xmlWriter.writeStartElement(\"ParquetTextConfiguration\").writeEndElement();"); + fileContent = fileContent.replace("deserializedQueryFormat.parquetTextConfiguration = reader.null;", + "deserializedQueryFormat.parquetTextConfiguration = new Object();\nxmlReader.skipElement();"); + classCustomization.getEditor().replaceFile(classCustomization.getFileName(), fileContent); - /* - * Uses ClassCustomization.customizeAst to replace the 'localName' value of the JacksonXmlRootElement instead of - * the previous implementation which removed the JacksonXmlRootElement then added it back with the updated - * 'localName'. The previous implementation would occasionally run into an issue where the JacksonXmlRootElement - * import wouldn't be added back, causing a failure in CI when validating that code generation was up-to-date. - */ - @SuppressWarnings("OptionalGetWithoutIsPresent") - private void changeJacksonXmlRootElementName(ClassCustomization classCustomization, String rootElementName) { - classCustomization.customizeAst(ast -> ast.getClassByName(classCustomization.getClassName()).get() - .getAnnotationByName("JacksonXmlRootElement").get() - .asNormalAnnotationExpr() - .setPairs(new NodeList<>(new MemberValuePair("localName", new StringLiteralExpr(rootElementName))))); + } + + private static void customizeBlobHierarchyListSegment(ClassCustomization classCustomization){ + classCustomization.customizeAst(ast -> { + ClassOrInterfaceDeclaration clazz = ast.getClassByName(classCustomization.getClassName()).get(); + + clazz.getMethodsBySignature("toXml", "XmlWriter", "String").get(0) + .setBody(StaticJavaParser.parseBlock(String.join("\n", + "{", + "rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? \"Blobs\" : rootElementName;", + "xmlWriter.writeStartElement(rootElementName);", + "if (this.blobPrefixes != null) {", + " for (BlobPrefixInternal element : this.blobPrefixes) {", + " xmlWriter.writeXml(element, \"BlobPrefixInternal\");", + " }", + "}", + "if (this.blobItems != null) {", + " for (BlobItemInternal element : this.blobItems) {", + " xmlWriter.writeXml(element, \"Blob\");", + " }", + "}", + "return xmlWriter.writeEndElement();", + "}" + ))); + + clazz.getMethodsBySignature("fromXml", "XmlReader", "String").get(0) + .setBody(StaticJavaParser.parseBlock(String.join("\n", + "{", + "String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? \"Blobs\" : rootElementName;", + "return xmlReader.readObject(finalRootElementName, reader -> {", + " BlobHierarchyListSegment deserializedBlobHierarchyListSegment", + " = new BlobHierarchyListSegment();", + " while (reader.nextElement() != XmlToken.END_ELEMENT) {", + " QName elementName = reader.getElementName();", + "", + " if (\"BlobPrefixInternal\".equals(elementName.getLocalPart())) {", + " if (deserializedBlobHierarchyListSegment.blobPrefixes == null) {", + " deserializedBlobHierarchyListSegment.blobPrefixes = new ArrayList<>();", + " }", + " deserializedBlobHierarchyListSegment.blobPrefixes", + " .add(BlobPrefixInternal.fromXml(reader, \"BlobPrefixInternal\"));", + " } else if (\"Blob\".equals(elementName.getLocalPart())) {", + " if (deserializedBlobHierarchyListSegment.blobItems == null) {", + " deserializedBlobHierarchyListSegment.blobItems = new ArrayList<>();", + " }", + " deserializedBlobHierarchyListSegment.blobItems.add(BlobItemInternal.fromXml(reader, \"Blob\"));", + " } else {", + " reader.skipElement();", + " }", + " }", + "", + " return deserializedBlobHierarchyListSegment;", + "});", + "}" + ))); + }); + } + + private static void customizeBlobFlatListSegment(ClassCustomization classCustomization) { + classCustomization.customizeAst(ast -> { + ClassOrInterfaceDeclaration clazz = ast.getClassByName(classCustomization.getClassName()).get(); + + clazz.getMethodsBySignature("toXml", "XmlWriter", "String").get(0) + .setBody(StaticJavaParser.parseBlock( + "{\n" + + "rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? \"Blobs\" : rootElementName;" + + " xmlWriter.writeStartElement(rootElementName);\n" + + " if (this.blobItems != null) {\n" + + " for (BlobItemInternal element : this.blobItems) {\n" + + " xmlWriter.writeXml(element, \"Blob\");\n" + + " }\n" + + " }\n" + + " return xmlWriter.writeEndElement();\n" + + "}" + )); + + clazz.getMethodsBySignature("fromXml", "XmlReader", "String").get(0) + .setBody(StaticJavaParser.parseBlock( + "{\n" + + "String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? \"Blobs\" : rootElementName;\n" + + " return xmlReader.readObject(finalRootElementName, reader -> {\n" + + " BlobFlatListSegment deserializedBlobFlatListSegment = new BlobFlatListSegment();\n" + + " while (reader.nextElement() != XmlToken.END_ELEMENT) {\n" + + " QName elementName = reader.getElementName();\n" + + " if (\"Blob\".equals(elementName.getLocalPart())) {\n" + + " if (deserializedBlobFlatListSegment.blobItems == null) {\n" + + " deserializedBlobFlatListSegment.blobItems = new ArrayList<>();\n" + + " }\n" + + " deserializedBlobFlatListSegment.blobItems.add(BlobItemInternal.fromXml(reader, \"Blob\"));\n" + + " } else {\n" + + " reader.skipElement();\n" + + " }\n" + + " }\n" + + "\n" + + " return deserializedBlobFlatListSegment;\n" + + " });\n" + + "}" + )); + }); } } From 76c25367955ba34f2e9a7ed48ff73935dffc8888 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 25 Jun 2024 12:09:13 -0700 Subject: [PATCH 02/45] adding all changes for decoupling sync and async client --- .../com/azure/storage/blob/BlobClient.java | 108 ++- .../azure/storage/blob/BlobClientBuilder.java | 36 +- .../blob/BlobContainerAsyncClient.java | 31 +- .../storage/blob/BlobContainerClient.java | 414 +++++++++-- .../blob/BlobContainerClientBuilder.java | 33 +- .../storage/blob/BlobServiceAsyncClient.java | 91 +-- .../azure/storage/blob/BlobServiceClient.java | 312 ++++++++- .../blob/BlobServiceClientBuilder.java | 47 +- .../blob/implementation/util/ModelHelper.java | 184 +++++ .../specialized/AppendBlobAsyncClient.java | 3 +- .../blob/specialized/AppendBlobClient.java | 144 +++- .../blob/specialized/BlobAsyncClientBase.java | 27 +- .../blob/specialized/BlobClientBase.java | 649 +++++++++++++++--- .../blob/specialized/BlobLeaseClient.java | 165 ++++- .../specialized/BlobLeaseClientBuilder.java | 4 +- .../specialized/BlockBlobAsyncClient.java | 7 +- .../blob/specialized/BlockBlobClient.java | 62 +- .../blob/specialized/PageBlobAsyncClient.java | 27 +- .../blob/specialized/PageBlobClient.java | 410 +++++++++-- 19 files changed, 2347 insertions(+), 407 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index 360104fb2f524..3147c5fcde343 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -6,13 +6,16 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.blob.options.BlobParallelUploadOptions; import com.azure.storage.blob.models.BlobRequestConditions; @@ -32,6 +35,8 @@ import java.io.InputStream; import java.io.UncheckedIOException; +import java.nio.channels.AsynchronousFileChannel; +import java.nio.file.Path; import java.time.Duration; import java.util.Map; import java.util.Objects; @@ -61,19 +66,26 @@ public class BlobClient extends BlobClientBase { /** * The block size to use if none is specified in parallel operations. */ - public static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = BlobAsyncClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE; + public static final int BLOB_DEFAULT_UPLOAD_BLOCK_SIZE = 4 * Constants.MB; /** * The number of buffers to use if none is specied on the buffered upload method. */ - public static final int BLOB_DEFAULT_NUMBER_OF_BUFFERS = BlobAsyncClient.BLOB_DEFAULT_NUMBER_OF_BUFFERS; + public static final int BLOB_DEFAULT_NUMBER_OF_BUFFERS = 8; /** * If a blob is known to be greater than 100MB, using a larger block size will trigger some server-side * optimizations. If the block size is not set and the size of the blob is known to be greater than 100MB, this * value will be used. */ - public static final int BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE = BlobAsyncClient.BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE; + public static final int BLOB_DEFAULT_HTBB_UPLOAD_BLOCK_SIZE = 8 * Constants.MB; + /** + * The default block size used in {@link FluxUtil#readFile(AsynchronousFileChannel)}. + * This is to make sure we're using same size when using {@link BinaryData#fromFile(Path, int)} + * and {@link BinaryData#fromFile(Path, Long, Long, int)} + * to represent the content. + */ + private static final int DEFAULT_FILE_READ_CHUNK_SIZE = 1024 * 64; private final BlobAsyncClient client; private BlockBlobClient blockBlobClient; @@ -89,6 +101,71 @@ protected BlobClient(BlobAsyncClient client) { this.client = client; } + /** + * Protected constructor for use by {@link BlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + */ + protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { + this(client, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, + customerProvidedKey, null); + } + + /** + * Protected constructor for use by {@link BlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + */ + protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey, + EncryptionScope encryptionScope) { + this(client, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, + encryptionScope, null); + } + + /** + * Protected constructor for use by {@link BlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param versionId The version identifier for the blob, pass {@code null} to interact with the latest blob version. + */ + protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey, + EncryptionScope encryptionScope, String versionId) { + super(client, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, + encryptionScope, versionId); + this.client = client; + } + /** * Creates a new {@link BlobClient} linked to the {@code snapshot} of this blob resource. * @@ -97,7 +174,8 @@ protected BlobClient(BlobAsyncClient client) { */ @Override public BlobClient getSnapshotClient(String snapshot) { - return new BlobClient(client.getSnapshotClient(snapshot)); + return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), encryptionScope, getVersionId()); } /** @@ -109,7 +187,8 @@ public BlobClient getSnapshotClient(String snapshot) { */ @Override public BlobClient getVersionClient(String versionId) { - return new BlobClient(client.getVersionClient(versionId)); + return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), encryptionScope, versionId); } /** @@ -120,7 +199,13 @@ public BlobClient getVersionClient(String versionId) { */ @Override public BlobClient getEncryptionScopeClient(String encryptionScope) { - return new BlobClient(client.getEncryptionScopeAsyncClient(encryptionScope)); + EncryptionScope finalEncryptionScope = null; + if (encryptionScope != null) { + finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); + } + return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), finalEncryptionScope, + getVersionId()); } /** @@ -132,7 +217,16 @@ public BlobClient getEncryptionScopeClient(String encryptionScope) { */ @Override public BlobClient getCustomerProvidedKeyClient(CustomerProvidedKey customerProvidedKey) { - return new BlobClient(client.getCustomerProvidedKeyAsyncClient(customerProvidedKey)); + CpkInfo finalCustomerProvidedKey = null; + if (customerProvidedKey != null) { + finalCustomerProvidedKey = new CpkInfo() + .setEncryptionKey(customerProvidedKey.getKey()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) + .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); + } + return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), getSnapshotId(), finalCustomerProvidedKey, encryptionScope, + getVersionId()); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java index 7e2a52618a8fe..561575dc16772 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java @@ -127,7 +127,29 @@ public BlobClientBuilder() { * and {@link #retryOptions(RequestRetryOptions)} have been set. */ public BlobClient buildClient() { - return new BlobClient(buildAsyncClient()); + Objects.requireNonNull(blobName, "'blobName' cannot be null."); + Objects.requireNonNull(endpoint, "'endpoint' cannot be null"); + + BuilderHelper.httpsValidation(customerProvidedKey, "customer provided key", endpoint, LOGGER); + + if (Objects.nonNull(customerProvidedKey) && Objects.nonNull(encryptionScope)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Customer provided key and encryption " + + "scope cannot both be set")); + } + + /* + Implicit and explicit root container access are functionally equivalent, but explicit references are easier + to read and debug. + */ + String blobContainerName = CoreUtils.isNullOrEmpty(containerName) ? BlobContainerClient.ROOT_CONTAINER_NAME + : containerName; + + BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); + + BlobAsyncClient asyncClient = buildAsyncClient(); + + return new BlobClient(asyncClient, asyncClient.getHttpPipeline(), endpoint, serviceVersion, accountName, + blobContainerName, blobName, snapshot, customerProvidedKey, encryptionScope, versionId); } /** @@ -171,15 +193,19 @@ public BlobAsyncClient buildAsyncClient() { BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); - HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline( - storageSharedKeyCredential, tokenCredential, azureSasCredential, sasToken, - endpoint, retryOptions, coreRetryOptions, logOptions, - clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, audience, LOGGER); + HttpPipeline pipeline = constructPipeline(); return new BlobAsyncClient(pipeline, endpoint, serviceVersion, accountName, blobContainerName, blobName, snapshot, customerProvidedKey, encryptionScope, versionId); } + private HttpPipeline constructPipeline() { + return (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline( + storageSharedKeyCredential, tokenCredential, azureSasCredential, sasToken, + endpoint, retryOptions, coreRetryOptions, logOptions, + clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, audience, LOGGER); + } + /** * Sets the {@link CustomerProvidedKey customer provided key} that is used to encrypt blob contents on the server. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index e20d45056850f..676f55564a9c6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -314,6 +314,19 @@ public String getEncryptionScope() { return encryptionScope.getEncryptionScope(); } + /** + * Gets the {@link EncryptionScope} used to encrypt this blob's content on the server. + * + * @return the encryption scope used for encryption. + */ + BlobContainerEncryptionScope getBlobContainerEncryptionScope() { + if (blobContainerEncryptionScope == null) { + return null; + } + return blobContainerEncryptionScope; + } + + /** * Gets if the container this client represents exists in the cloud. * @@ -564,7 +577,7 @@ public Mono> deleteWithResponse(BlobRequestConditions requestCond Mono> deleteWithResponse(BlobRequestConditions requestConditions, Context context) { requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - if (!validateNoETag(requestConditions)) { + if (!ModelHelper.validateNoETag(requestConditions)) { // Throwing is preferred to Mono.error because this will error out immediately instead of waiting until // subscription. throw LOGGER.logExceptionAsError( @@ -790,7 +803,7 @@ Mono> setMetadataWithResponse(Map metadata, BlobRequestConditions requestConditions, Context context) { context = context == null ? Context.NONE : context; requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - if (!validateNoETag(requestConditions) || requestConditions.getIfUnmodifiedSince() != null) { + if (!ModelHelper.validateNoETag(requestConditions) || requestConditions.getIfUnmodifiedSince() != null) { // Throwing is preferred to Mono.error because this will error out immediately instead of waiting until // subscription. throw LOGGER.logExceptionAsError(new UnsupportedOperationException( @@ -868,7 +881,7 @@ Mono> getAccessPolicyWithResponse(String l containerName, null, leaseId, null, context) .map(response -> new SimpleResponse<>(response, new BlobContainerAccessPolicies(response.getDeserializedHeaders().getXMsBlobPublicAccess(), - response.getValue()))); + response.getValue().items()))); } /** @@ -960,7 +973,7 @@ Mono> setAccessPolicyWithResponse(PublicAccessType accessType, List identifiers, BlobRequestConditions requestConditions, Context context) { requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - if (!validateNoETag(requestConditions)) { + if (!ModelHelper.validateNoETag(requestConditions)) { // Throwing is preferred to Mono.error because this will error out immediately instead of waiting until // subscription. throw LOGGER.logExceptionAsError( @@ -1520,8 +1533,7 @@ public Mono> getAccountInfoWithResponse() { Mono> getAccountInfoWithResponse(Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getContainers().getAccountInfoWithResponseAsync(containerName, null, - null, context) + return this.azureBlobStorage.getContainers().getAccountInfoWithResponseAsync(containerName, context) .map(rb -> { ContainersGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind())); @@ -1688,13 +1700,6 @@ public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureV .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), context); } - private static boolean validateNoETag(BlobRequestConditions modifiedRequestConditions) { - if (modifiedRequestConditions == null) { - return true; - } - return modifiedRequestConditions.getIfMatch() == null && modifiedRequestConditions.getIfNoneMatch() == null; - } - // private boolean validateNoTime(BlobRequestConditions modifiedRequestConditions) { // if (modifiedRequestConditions == null) { // return true; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 1642bffa41c88..b233b9a5f615f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -6,16 +6,47 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.SharedExecutorService; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.accesshelpers.BlobItemConstructorProxy; +import com.azure.storage.blob.implementation.models.BlobHierarchyListSegment; +import com.azure.storage.blob.implementation.models.BlobSignedIdentifierWrapper; +import com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders; +import com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders; +import com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders; +import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders; +import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.models.FilterBlobSegment; +import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; +import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.implementation.util.BlobSasImplUtil; +import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobContainerAccessPolicies; +import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerProperties; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobSignedIdentifier; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; +import com.azure.storage.blob.models.CustomerProvidedKey; +import com.azure.storage.blob.models.ListBlobsIncludeItem; import com.azure.storage.blob.models.ListBlobsOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; @@ -25,15 +56,27 @@ import com.azure.storage.blob.options.FindBlobsOptions; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; +import java.net.URI; import java.time.Duration; import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; +import java.util.function.BiFunction; +import java.util.function.Supplier; +import java.util.stream.Collectors; import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; +import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** * Client to a container. It may only be instantiated through a {@link BlobContainerClientBuilder} or via the method @@ -51,8 +94,6 @@ */ @ServiceClient(builder = BlobContainerClientBuilder.class) public final class BlobContainerClient { - private final BlobContainerAsyncClient client; - /** * Special container name for the root container in the Storage account. */ @@ -66,7 +107,16 @@ public final class BlobContainerClient { /** * Special container name for the logs container in the Storage account. */ - public static final String LOG_CONTAINER_NAME = BlobContainerAsyncClient.LOG_CONTAINER_NAME; + public static final String LOG_CONTAINER_NAME = "$logs"; + private static final ClientLogger LOGGER = new ClientLogger(BlobContainerClient.class); + private final AzureBlobStorageImpl azureBlobStorage; + + private final String accountName; + private final String containerName; + private final BlobServiceVersion serviceVersion; + private final CpkInfo customerProvidedKey; // only used to pass down to blob clients + private final EncryptionScope encryptionScope; // only used to pass down to blob clients + private final BlobContainerEncryptionScope blobContainerEncryptionScope; /** * Package-private constructor for use by {@link BlobContainerClientBuilder}. @@ -74,7 +124,47 @@ public final class BlobContainerClient { * @param client the async container client */ BlobContainerClient(BlobContainerAsyncClient client) { - this.client = client; + this(client.getHttpPipeline(), client.getAccountUrl(), client.getServiceVersion(), + client.getAccountName(), client.getBlobContainerName(), client.getCustomerProvidedKey(), + new EncryptionScope().setEncryptionScope(client.getEncryptionScope()), + client.getBlobContainerEncryptionScope()); + } + + /** + * Package-private constructor for use by {@link BlobContainerClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + */ + BlobContainerClient( HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, + String containerName, CpkInfo customerProvidedKey, EncryptionScope encryptionScope, + BlobContainerEncryptionScope blobContainerEncryptionScope) { + this.azureBlobStorage = new AzureBlobStorageImplBuilder() + .pipeline(pipeline) + .url(url) + .version(serviceVersion.getVersion()) + .buildClient(); + this.serviceVersion = serviceVersion; + + this.accountName = accountName; + this.containerName = containerName; + this.customerProvidedKey = customerProvidedKey; + this.encryptionScope = encryptionScope; + this.blobContainerEncryptionScope = blobContainerEncryptionScope; + /* Check to make sure the uri is valid. We don't want the error to occur later in the generated layer + when the sas token has already been applied. */ + try { + URI.create(getBlobContainerUrl()); + } catch (IllegalArgumentException ex) { + throw LOGGER.logExceptionAsError(ex); + } } @@ -95,7 +185,8 @@ public final class BlobContainerClient { * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobClient(String blobName) { - return new BlobClient(client.getBlobAsyncClient(blobName)); + return new BlobClient(new BlobAsyncClient(getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getBlobContainerName(), blobName, null, getCustomerProvidedKey(), encryptionScope)); } /** @@ -116,7 +207,8 @@ public BlobClient getBlobClient(String blobName) { * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobClient(String blobName, String snapshot) { - return new BlobClient(client.getBlobAsyncClient(blobName, snapshot)); + return new BlobClient(new BlobAsyncClient(getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getBlobContainerName(), blobName, snapshot, getCustomerProvidedKey(), encryptionScope)); } /** @@ -129,7 +221,9 @@ public BlobClient getBlobClient(String blobName, String snapshot) { * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobVersionClient(String blobName, String versionId) { - return new BlobClient(client.getBlobVersionAsyncClient(blobName, versionId)); + return new BlobClient(new BlobAsyncClient(getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getBlobContainerName(), blobName, null, getCustomerProvidedKey(), encryptionScope, + versionId)); } /** @@ -147,7 +241,7 @@ public BlobClient getBlobVersionClient(String blobName, String versionId) { * @return The name of container. */ public String getBlobContainerName() { - return this.client.getBlobContainerName(); + return containerName; } /** @@ -156,7 +250,7 @@ public String getBlobContainerName() { * @return the URL of the storage account */ public String getAccountUrl() { - return this.client.getAccountUrl(); + return azureBlobStorage.getUrl(); } /** @@ -165,7 +259,7 @@ public String getAccountUrl() { * @return the URL. */ public String getBlobContainerUrl() { - return client.getBlobContainerUrl(); + return azureBlobStorage.getUrl() + "/" + containerName; } /** @@ -174,7 +268,7 @@ public String getBlobContainerUrl() { * @return account name associated with this storage resource. */ public String getAccountName() { - return this.client.getAccountName(); + return this.accountName; } /** @@ -183,7 +277,15 @@ public String getAccountName() { * @return {@link BlobServiceClient} */ public BlobServiceClient getServiceClient() { - return this.client.getServiceClientBuilder().buildClient(); + CustomerProvidedKey encryptionKey = this.customerProvidedKey == null ? null + : new CustomerProvidedKey(this.customerProvidedKey.getEncryptionKey()); + return new BlobServiceClientBuilder() + .endpoint(this.getBlobContainerUrl()) + .pipeline(this.getHttpPipeline()) + .serviceVersion(this.serviceVersion) + .blobContainerEncryptionScope(this.blobContainerEncryptionScope) + .encryptionScope(this.getEncryptionScope()) + .customerProvidedKey(encryptionKey).buildClient(); } /** @@ -192,7 +294,7 @@ public BlobServiceClient getServiceClient() { * @return the service version the client is using. */ public BlobServiceVersion getServiceVersion() { - return this.client.getServiceVersion(); + return serviceVersion; } /** @@ -201,7 +303,7 @@ public BlobServiceVersion getServiceVersion() { * @return The pipeline. */ public HttpPipeline getHttpPipeline() { - return client.getHttpPipeline(); + return azureBlobStorage.getHttpPipeline(); } /** @@ -211,7 +313,7 @@ public HttpPipeline getHttpPipeline() { * @return the customer provided key used for encryption. */ public CpkInfo getCustomerProvidedKey() { - return client.getCustomerProvidedKey(); + return customerProvidedKey; } /** @@ -220,7 +322,10 @@ public CpkInfo getCustomerProvidedKey() { * @return the encryption scope used for encryption. */ public String getEncryptionScope() { - return client.getEncryptionScope(); + if (encryptionScope == null) { + return null; + } + return encryptionScope.getEncryptionScope(); } /** @@ -258,9 +363,18 @@ public boolean exists() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response existsWithResponse(Duration timeout, Context context) { - Mono> response = client.existsWithResponse(context); - - return blockWithOptionalTimeout(response, timeout); + try { + Response response = getPropertiesWithResponse(null, timeout, context); + return new SimpleResponse<>(response, true); + } catch (RuntimeException e) { + if (ModelHelper.checkContainerDoesNotExistStatusCode(e) && e instanceof HttpResponseException) { + HttpResponse response = ((HttpResponseException) e).getResponse(); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), false); + } else { + throw LOGGER.logExceptionAsError(e); + } + } } /** @@ -316,8 +430,11 @@ public void create() { @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(Map metadata, PublicAccessType accessType, Duration timeout, Context context) { - Mono> response = client.createWithResponse(metadata, accessType, context); - return blockWithOptionalTimeout(response, timeout); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> this.azureBlobStorage.getContainers() + .createNoCustomHeadersWithResponse(containerName, null, metadata, accessType, null, + blobContainerEncryptionScope, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -371,8 +488,21 @@ public boolean createIfNotExists() { @ServiceMethod(returns = ReturnType.SINGLE) public Response createIfNotExistsWithResponse(BlobContainerCreateOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(client. - createIfNotExistsWithResponse(options, context), timeout); + BlobContainerCreateOptions finalOptions = options == null ? new BlobContainerCreateOptions() : options; + try { + Response response = createWithResponse(finalOptions.getMetadata(), finalOptions.getPublicAccessType(), + timeout, context); + return new SimpleResponse<>(response, true); + } catch (BlobStorageException e) { + if (e.getStatusCode() == 409 && e.getErrorCode().equals(BlobErrorCode.CONTAINER_ALREADY_EXISTS)) { + HttpResponse res = e.getResponse(); + return new SimpleResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), false); + } else { + throw LOGGER.logExceptionAsError(e); + } + } catch (RuntimeException e) { + throw LOGGER.logExceptionAsError(e); + } } /** @@ -427,9 +557,22 @@ public void delete() { @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client.deleteWithResponse(requestConditions, context); + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() + : requestConditions; + if (!ModelHelper.validateNoETag(requestConditions)) { + // Throwing is preferred to Mono.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError( + new UnsupportedOperationException("ETag access conditions are not supported for this API.")); + } + Context finalContext = context == null ? Context.NONE : context; - return blockWithOptionalTimeout(response, timeout); + Callable> operation = () -> this.azureBlobStorage.getContainers() + .deleteNoCustomHeadersWithResponse(containerName, null, finalRequestConditions.getLeaseId(), + finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), null, + finalContext); + + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -484,7 +627,17 @@ public boolean deleteIfExists() { @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteIfExistsWithResponse(BlobRequestConditions requestConditions, Duration timeout, Context context) { - return blockWithOptionalTimeout(client.deleteIfExistsWithResponse(requestConditions, context), timeout); + try { + Response response = this.deleteWithResponse(requestConditions, timeout, context); + return new SimpleResponse<>(response, true); + } catch (BlobStorageException e) { + if (e.getStatusCode() == 404 && e.getErrorCode().equals(BlobErrorCode.CONTAINER_NOT_FOUND)) { + HttpResponse res = e.getResponse(); + return new SimpleResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), false); + } else { + throw LOGGER.logExceptionAsError(e); + } + } } /** @@ -537,7 +690,19 @@ public BlobContainerProperties getProperties() { @ServiceMethod(returns = ReturnType.SINGLE) public Response getPropertiesWithResponse(String leaseId, Duration timeout, Context context) { - return blockWithOptionalTimeout(client.getPropertiesWithResponse(leaseId, context), timeout); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getContainers().getPropertiesWithResponse(containerName, null, leaseId, null, + finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + ContainersGetPropertiesHeaders hd = response.getDeserializedHeaders(); + BlobContainerProperties properties = new BlobContainerProperties(hd.getXMsMeta(), hd.getETag(), + hd.getLastModified(), hd.getXMsLeaseDuration(), hd.getXMsLeaseState(), hd.getXMsLeaseStatus(), + hd.getXMsBlobPublicAccess(), Boolean.TRUE.equals(hd.isXMsHasImmutabilityPolicy()), + Boolean.TRUE.equals(hd.isXMsHasLegalHold()), hd.getXMsDefaultEncryptionScope(), + hd.isXMsDenyEncryptionScopeOverride(), hd.isXMsImmutableStorageWithVersioningEnabled()); + return new SimpleResponse<>(response, properties); } /** @@ -594,9 +759,19 @@ public void setMetadata(Map metadata) { @ServiceMethod(returns = ReturnType.SINGLE) public Response setMetadataWithResponse(Map metadata, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client.setMetadataWithResponse(metadata, requestConditions, - context); - return blockWithOptionalTimeout(response, timeout); + Context finalContext = context == null ? Context.NONE : context; + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() + : requestConditions; + if (!ModelHelper.validateNoETag(finalRequestConditions) || finalRequestConditions.getIfUnmodifiedSince() != null) { + // Throwing is preferred to Mono.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError(new UnsupportedOperationException( + "If-Modified-Since is the only HTTP access condition supported for this API")); + } + Callable> operation = () -> azureBlobStorage.getContainers().setMetadataWithResponse( + containerName, null, finalRequestConditions.getLeaseId(), metadata, + finalRequestConditions.getIfModifiedSince(), null, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -656,7 +831,14 @@ public BlobContainerAccessPolicies getAccessPolicy() { @ServiceMethod(returns = ReturnType.SINGLE) public Response getAccessPolicyWithResponse(String leaseId, Duration timeout, Context context) { - return blockWithOptionalTimeout(client.getAccessPolicyWithResponse(leaseId, context), timeout); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getContainers().getAccessPolicyWithResponse(containerName, null, leaseId, null, + finalContext); + ResponseBase response = sendRequest(operation, + timeout, BlobStorageException.class); + return new SimpleResponse<>(response, new BlobContainerAccessPolicies( + response.getDeserializedHeaders().getXMsBlobPublicAccess(), response.getValue().items())); } /** @@ -745,10 +927,39 @@ public void setAccessPolicy(PublicAccessType accessType, public Response setAccessPolicyWithResponse(PublicAccessType accessType, List identifiers, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client - .setAccessPolicyWithResponse(accessType, identifiers, requestConditions, context); + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; + + if (!ModelHelper.validateNoETag(requestConditions)) { + // Throwing is preferred to Mono.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError( + new UnsupportedOperationException("ETag access conditions are not supported for this API.")); + } - return blockWithOptionalTimeout(response, timeout); + /* + We truncate to seconds because the service only supports nanoseconds or seconds, but doing an + OffsetDateTime.now will only give back milliseconds (more precise fields are zeroed and not serialized). This + allows for proper serialization with no real detriment to users as sub-second precision on active time for + signed identifiers is not really necessary. + */ + if (identifiers != null) { + for (BlobSignedIdentifier identifier : identifiers) { + if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getStartsOn() != null) { + identifier.getAccessPolicy().setStartsOn( + identifier.getAccessPolicy().getStartsOn().truncatedTo(ChronoUnit.SECONDS)); + } + if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getExpiresOn() != null) { + identifier.getAccessPolicy().setExpiresOn( + identifier.getAccessPolicy().getExpiresOn().truncatedTo(ChronoUnit.SECONDS)); + } + } + } + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> this.azureBlobStorage.getContainers() + .setAccessPolicyNoCustomHeadersWithResponse(containerName, null, finalRequestConditions.getLeaseId(), + accessType, finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), null, identifiers, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -858,7 +1069,38 @@ public PagedIterable listBlobs(ListBlobsOptions options, Duration time */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBlobs(ListBlobsOptions options, String continuationToken, Duration timeout) { - return new PagedIterable<>(client.listBlobsFlatWithOptionalTimeout(options, continuationToken, timeout)); + BiFunction> retriever = (nextMarker, pageSize) -> { + ListBlobsOptions finalOptions = options == null ? new ListBlobsOptions() : options; + if (pageSize != null) { + finalOptions.setMaxResultsPerPage(pageSize); + } + Supplier> operation = () -> { + ResponseBase response = + this.azureBlobStorage.getContainers().listBlobFlatSegmentWithResponse( + containerName, finalOptions.getPrefix(), nextMarker, finalOptions.getMaxResultsPerPage(), + finalOptions.getDetails().toList(), null, null, Context.NONE); + + List value = response.getValue().getSegment() == null ? Collections.emptyList() : + response.getValue().getSegment().getBlobItems().stream() + .map(ModelHelper::populateBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + value, + response.getValue().getNextMarker(), + response.getDeserializedHeaders()); + }; + try { + return timeout != null ? CoreUtils.getResultWithTimeout(SharedExecutorService.getInstance() + .submit(operation::get), timeout) : operation.get(); + } catch (InterruptedException | ExecutionException | TimeoutException e) { + throw LOGGER.logExceptionAsError(new RuntimeException("Failed to retrieve blobs with timeout.", e)); + } + }; + return new PagedIterable<>(pageSize -> retriever.apply(continuationToken, pageSize), retriever); } /** @@ -953,8 +1195,46 @@ public PagedIterable listBlobsByHierarchy(String directory) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsOptions options, Duration timeout) { - return new PagedIterable<>(client - .listBlobsHierarchyWithOptionalTimeout(delimiter, options, timeout)); + BiFunction> func = (marker, pageSize) -> { + ListBlobsOptions finalOptions; + if (pageSize != null) { + finalOptions = options == null ? new ListBlobsOptions().setMaxResultsPerPage(pageSize) : + new ListBlobsOptions() + .setMaxResultsPerPage(pageSize) + .setPrefix(options.getPrefix()) + .setDetails(options.getDetails()); + } else { + finalOptions = options; + } + return listBlobsHierarchySegment(marker, delimiter, finalOptions, timeout); + }; + return new PagedIterable<>(() -> func.apply(null, null), marker -> func.apply(marker, null)); + } + + private PagedResponse listBlobsHierarchySegment(String marker, String delimiter, ListBlobsOptions options, + Duration timeout) { + ArrayList include = options.getDetails().toList().isEmpty() ? null + : options.getDetails().toList(); + + Callable> operation = + () -> azureBlobStorage.getContainers().listBlobHierarchySegmentWithResponse(containerName, delimiter, + options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, null, Context.NONE); + + ResponseBase response = + StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + + BlobHierarchyListSegment segment = response.getValue().getSegment(); + List value = new ArrayList<>(); + if (segment != null) { + segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); + segment.getBlobPrefixes().forEach(prefix -> value.add(new BlobItem() + .setName(ModelHelper.toBlobNameString(prefix.getName())) + .setIsPrefix(true))); + } + + return new PagedResponseBase<>( + response.getRequest(), response.getStatusCode(), response.getHeaders(), value, + response.getValue().getNextMarker(), response.getDeserializedHeaders()); } /** @@ -1002,7 +1282,43 @@ public PagedIterable findBlobsByTags(String query) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable findBlobsByTags(FindBlobsOptions options, Duration timeout, Context context) { - return new PagedIterable<>(client.findBlobsByTags(options, timeout, context)); + StorageImplUtils.assertNotNull("options", options); + BiFunction> func = (marker, pageSize) -> { + // Use pageSize if provided, otherwise use maxResultsPerPage from options + int finalPageSize = (pageSize != null) ? pageSize : (options.getMaxResultsPerPage() != null ? options.getMaxResultsPerPage() : Integer.MAX_VALUE); + FindBlobsOptions finalOptions = new FindBlobsOptions(options.getQuery()).setMaxResultsPerPage(finalPageSize); + + return findBlobsByTagsHelper(finalOptions, marker, timeout, context); + }; + return new PagedIterable<>(() -> func.apply(null, null), marker -> func.apply(marker, null)); + } + + private PagedResponse findBlobsByTagsHelper( + FindBlobsOptions options, String marker, + Duration timeout, Context context) { + + StorageImplUtils.assertNotNull("options", options); + Callable> operation = () -> + this.azureBlobStorage.getContainers().filterBlobsWithResponse( + containerName, null, null, options.getQuery(), marker, + options.getMaxResultsPerPage(), null, context); + + ResponseBase response = + StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + + List value = response.getValue().getBlobs() == null + ? Collections.emptyList() + : response.getValue().getBlobs().stream() + .map(ModelHelper::populateTaggedBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + value, + response.getValue().getNextMarker(), + response.getDeserializedHeaders()); } /** @@ -1046,9 +1362,13 @@ public StorageAccountInfo getAccountInfo(Duration timeout) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAccountInfoWithResponse(Duration timeout, Context context) { - Mono> response = client.getAccountInfoWithResponse(context); - - return blockWithOptionalTimeout(response, timeout); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getContainers().getAccountInfoWithResponse(containerName, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + ContainersGetAccountInfoHeaders hd = response.getDeserializedHeaders(); + return new SimpleResponse<>(response, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind())); } // TODO: Reintroduce this API once service starts supporting it. @@ -1093,7 +1413,8 @@ public Response getAccountInfoWithResponse(Duration timeout, */ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, UserDelegationKey userDelegationKey) { - return this.client.generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey); + return generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey, getAccountName(), + Context.NONE); } /** @@ -1125,8 +1446,8 @@ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServic */ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, UserDelegationKey userDelegationKey, String accountName, Context context) { - return this.client.generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey, accountName, - context); + return new BlobSasImplUtil(blobServiceSasSignatureValues, getBlobContainerName()) + .generateUserDelegationSas(userDelegationKey, accountName, context); } /** @@ -1153,7 +1474,7 @@ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServic * @return A {@code String} representing the SAS query parameters. */ public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues) { - return this.client.generateSas(blobServiceSasSignatureValues); + return generateSas(blobServiceSasSignatureValues, Context.NONE); } /** @@ -1182,6 +1503,7 @@ public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureV * @return A {@code String} representing the SAS query parameters. */ public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, Context context) { - return this.client.generateSas(blobServiceSasSignatureValues, context); + return new BlobSasImplUtil(blobServiceSasSignatureValues, getBlobContainerName()) + .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), context); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java index cd4f9e8f9b574..28c1f10752476 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClientBuilder.java @@ -121,7 +121,26 @@ public BlobContainerClientBuilder() { * @throws IllegalStateException If multiple credentials have been specified. */ public BlobContainerClient buildClient() { - return new BlobContainerClient(buildAsyncClient()); + BuilderHelper.httpsValidation(customerProvidedKey, "customer provided key", endpoint, LOGGER); + + if (Objects.nonNull(customerProvidedKey) && Objects.nonNull(encryptionScope)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Customer provided key and encryption " + + "scope cannot both be set")); + } + + /* + Implicit and explicit root container access are functionally equivalent, but explicit references are easier + to read and debug. + */ + String blobContainerName = CoreUtils.isNullOrEmpty(containerName) ? BlobContainerClient.ROOT_CONTAINER_NAME + : containerName; + + BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); + + HttpPipeline pipeline = constructPipeline(); + + return new BlobContainerClient(pipeline, endpoint, serviceVersion, accountName, blobContainerName, + customerProvidedKey, encryptionScope, blobContainerEncryptionScope); } /** @@ -160,15 +179,19 @@ public BlobContainerAsyncClient buildAsyncClient() { BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); - HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline( - storageSharedKeyCredential, tokenCredential, azureSasCredential, sasToken, - endpoint, retryOptions, coreRetryOptions, logOptions, - clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, audience, LOGGER); + HttpPipeline pipeline = constructPipeline(); return new BlobContainerAsyncClient(pipeline, endpoint, serviceVersion, accountName, blobContainerName, customerProvidedKey, encryptionScope, blobContainerEncryptionScope); } + private HttpPipeline constructPipeline() { + return (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline( + storageSharedKeyCredential, tokenCredential, azureSasCredential, sasToken, + endpoint, retryOptions, coreRetryOptions, logOptions, + clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, audience, LOGGER); + } + /** * Sets the service endpoint, additionally parses it for information (SAS token, container name) * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index ffd34b33dfe6c..6dbc4c9634677 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -179,6 +179,22 @@ public BlobServiceVersion getServiceVersion() { return serviceVersion; } + CpkInfo getCustomerProvidedKey() { + return customerProvidedKey; + } + + EncryptionScope getEncryptionScope() { + return encryptionScope; + } + + BlobContainerEncryptionScope getBlobContainerEncryptionScope() { + return blobContainerEncryptionScope; + } + + boolean isAnonymousAccess() { + return anonymousAccess; + } + /** * Creates a new container within a storage account. If a container with the same name already exists, the operation * fails. For more information, see the @@ -538,7 +554,7 @@ private Mono> listBlobContainersSegment(String return StorageImplUtils.applyOptionalTimeout( this.azureBlobStorage.getServices().listBlobContainersSegmentSinglePageAsync( options.getPrefix(), marker, options.getMaxResultsPerPage(), - toIncludeTypes(options.getDetails()), + ModelHelper.toIncludeTypes(options.getDetails()), null, null, Context.NONE), timeout); } @@ -630,35 +646,6 @@ private Mono> findBlobsByTags( }); } - /** - * Converts {@link BlobContainerListDetails} into list of {@link ListBlobContainersIncludeType} - * that contains only options selected. If no option is selected then null is returned. - * - * @return a list of selected options converted into {@link ListBlobContainersIncludeType}, null if none - * of options has been selected. - */ - private List toIncludeTypes(BlobContainerListDetails blobContainerListDetails) { - boolean hasDetails = blobContainerListDetails != null - && (blobContainerListDetails.getRetrieveMetadata() - || blobContainerListDetails.getRetrieveDeleted() - || blobContainerListDetails.getRetrieveSystemContainers()); - if (hasDetails) { - List flags = new ArrayList<>(3); - if (blobContainerListDetails.getRetrieveDeleted()) { - flags.add(ListBlobContainersIncludeType.DELETED); - } - if (blobContainerListDetails.getRetrieveMetadata()) { - flags.add(ListBlobContainersIncludeType.METADATA); - } - if (blobContainerListDetails.getRetrieveSystemContainers()) { - flags.add(ListBlobContainersIncludeType.SYSTEM); - } - return flags; - } else { - return null; - } - } - /** * Gets the properties of a storage account’s Blob service. For more information, see the * Azure Docs. @@ -809,14 +796,14 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties, finalProperties.setLogging(properties.getLogging()); if (finalProperties.getLogging() != null) { StorageImplUtils.assertNotNull("Logging Version", finalProperties.getLogging().getVersion()); - validateRetentionPolicy(finalProperties.getLogging().getRetentionPolicy(), "Logging Retention Policy"); + ModelHelper.validateRetentionPolicy(finalProperties.getLogging().getRetentionPolicy(), "Logging Retention Policy"); } // Hour Metrics finalProperties.setHourMetrics(properties.getHourMetrics()); if (finalProperties.getHourMetrics() != null) { StorageImplUtils.assertNotNull("HourMetrics Version", finalProperties.getHourMetrics().getVersion()); - validateRetentionPolicy(finalProperties.getHourMetrics().getRetentionPolicy(), "HourMetrics Retention " + ModelHelper.validateRetentionPolicy(finalProperties.getHourMetrics().getRetentionPolicy(), "HourMetrics Retention " + "Policy"); if (finalProperties.getHourMetrics().isEnabled()) { StorageImplUtils.assertNotNull("HourMetrics IncludeApis", @@ -829,7 +816,7 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties, if (finalProperties.getMinuteMetrics() != null) { StorageImplUtils.assertNotNull("MinuteMetrics Version", finalProperties.getMinuteMetrics().getVersion()); - validateRetentionPolicy(finalProperties.getMinuteMetrics().getRetentionPolicy(), "MinuteMetrics " + ModelHelper.validateRetentionPolicy(finalProperties.getMinuteMetrics().getRetentionPolicy(), "MinuteMetrics " + "Retention Policy"); if (finalProperties.getMinuteMetrics().isEnabled()) { StorageImplUtils.assertNotNull("MinuteMetrics IncludeApis", @@ -841,7 +828,7 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties, if (properties.getCors() != null) { List corsRules = new ArrayList<>(); for (BlobCorsRule rule : properties.getCors()) { - corsRules.add(validatedCorsRule(rule)); + corsRules.add(ModelHelper.validatedCorsRule(rule)); } finalProperties.setCors(corsRules); } @@ -851,7 +838,7 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties, // Delete Retention Policy finalProperties.setDeleteRetentionPolicy(properties.getDeleteRetentionPolicy()); - validateRetentionPolicy(finalProperties.getDeleteRetentionPolicy(), "DeleteRetentionPolicy Days"); + ModelHelper.validateRetentionPolicy(finalProperties.getDeleteRetentionPolicy(), "DeleteRetentionPolicy Days"); // Static Website finalProperties.setStaticWebsite(properties.getStaticWebsite()); @@ -863,38 +850,6 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties, .setPropertiesNoCustomHeadersWithResponseAsync(finalProperties, null, null, context); } - /** - * Sets any null fields to "" since the service requires all Cors rules to be set if some are set. - * @param originalRule {@link BlobCorsRule} - * @return The validated {@link BlobCorsRule} - */ - private BlobCorsRule validatedCorsRule(BlobCorsRule originalRule) { - if (originalRule == null) { - return null; - } - BlobCorsRule validRule = new BlobCorsRule(); - validRule.setAllowedHeaders(StorageImplUtils.emptyIfNull(originalRule.getAllowedHeaders())); - validRule.setAllowedMethods(StorageImplUtils.emptyIfNull(originalRule.getAllowedMethods())); - validRule.setAllowedOrigins(StorageImplUtils.emptyIfNull(originalRule.getAllowedOrigins())); - validRule.setExposedHeaders(StorageImplUtils.emptyIfNull(originalRule.getExposedHeaders())); - validRule.setMaxAgeInSeconds(originalRule.getMaxAgeInSeconds()); - return validRule; - } - - /** - * Validates a {@link BlobRetentionPolicy} according to service specs for set properties. - * @param retentionPolicy {@link BlobRetentionPolicy} - * @param policyName The name of the variable for errors. - */ - private void validateRetentionPolicy(BlobRetentionPolicy retentionPolicy, String policyName) { - if (retentionPolicy == null) { - return; - } - if (retentionPolicy.isEnabled()) { - StorageImplUtils.assertInBounds(policyName, retentionPolicy.getDays(), 1, 365); - } - } - /** * Gets a user delegation key for use with this account's blob storage. Note: This method call is only valid when * using {@link TokenCredential} in this object's {@link HttpPipeline}. @@ -1071,7 +1026,7 @@ public Mono> getAccountInfoWithResponse() { Mono> getAccountInfoWithResponse(Context context) { throwOnAnonymousAccess(); - return this.azureBlobStorage.getServices().getAccountInfoWithResponseAsync(null, null, context) + return this.azureBlobStorage.getServices().getAccountInfoWithResponseAsync(context) .map(rb -> { ServicesGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(), diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 880709814cb5f..345bc2ba02f24 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -8,13 +8,40 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.models.BlobContainersSegment; +import com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders; +import com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.ContainersRestoreHeaders; +import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.models.FilterBlobSegment; +import com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders; +import com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders; +import com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders; +import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerItem; +import com.azure.storage.blob.models.BlobCorsRule; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobServiceProperties; import com.azure.storage.blob.models.BlobServiceStatistics; +import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.CpkInfo; +import com.azure.storage.blob.models.KeyInfo; +import com.azure.storage.blob.models.ListBlobContainersIncludeType; import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; @@ -24,13 +51,26 @@ import com.azure.storage.blob.options.FindBlobsOptions; import com.azure.storage.blob.options.UndeleteBlobContainerOptions; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.implementation.AccountSasImplUtil; +import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.AccountSasSignatureValues; import reactor.core.publisher.Mono; +import java.net.URI; import java.time.Duration; import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.Map; +import java.util.concurrent.Callable; +import java.util.function.BiFunction; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** * Client to a storage account. It may only be instantiated through a {@link BlobServiceClientBuilder}. This class does @@ -47,15 +87,51 @@ */ @ServiceClient(builder = BlobServiceClientBuilder.class) public final class BlobServiceClient { - private final BlobServiceAsyncClient blobServiceAsyncClient; + private static final ClientLogger LOGGER = new ClientLogger(BlobServiceClient.class); + private final AzureBlobStorageImpl azureBlobStorage; + private final String accountName; + private final BlobServiceVersion serviceVersion; + private final CpkInfo customerProvidedKey; // only used to pass down to blob clients + private final EncryptionScope encryptionScope; // only used to pass down to blob clients + private final BlobContainerEncryptionScope blobContainerEncryptionScope; // only used to pass down to container + // clients + private final boolean anonymousAccess; /** * Package-private constructor for use by {@link BlobServiceClientBuilder}. * - * @param blobServiceAsyncClient the async storage account client + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param anonymousAccess Whether the client was built with anonymousAccess */ - BlobServiceClient(BlobServiceAsyncClient blobServiceAsyncClient) { - this.blobServiceAsyncClient = blobServiceAsyncClient; + BlobServiceClient(HttpPipeline pipeline, String url, + BlobServiceVersion serviceVersion, String accountName, CpkInfo customerProvidedKey, EncryptionScope encryptionScope, + BlobContainerEncryptionScope blobContainerEncryptionScope, boolean anonymousAccess) { + /* Check to make sure the uri is valid. We don't want the error to occur later in the generated layer + when the sas token has already been applied. */ + try { + URI.create(url); + } catch (IllegalArgumentException ex) { + throw LOGGER.logExceptionAsError(ex); + } + this.azureBlobStorage = new AzureBlobStorageImplBuilder() + .pipeline(pipeline) + .url(url) + .version(serviceVersion.getVersion()) + .buildClient(); + this.serviceVersion = serviceVersion; + + this.accountName = accountName; + this.customerProvidedKey = customerProvidedKey; + this.encryptionScope = encryptionScope; + this.blobContainerEncryptionScope = blobContainerEncryptionScope; + this.anonymousAccess = anonymousAccess; } /** @@ -74,7 +150,11 @@ public final class BlobServiceClient { * @return A {@link BlobContainerClient} object pointing to the specified container */ public BlobContainerClient getBlobContainerClient(String containerName) { - return new BlobContainerClient(blobServiceAsyncClient.getBlobContainerAsyncClient(containerName)); + if (CoreUtils.isNullOrEmpty(containerName)) { + containerName = BlobContainerAsyncClient.ROOT_CONTAINER_NAME; + } + return new BlobContainerClient(getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), containerName, customerProvidedKey, encryptionScope, blobContainerEncryptionScope); } /** @@ -83,7 +163,7 @@ public BlobContainerClient getBlobContainerClient(String containerName) { * @return The pipeline. */ public HttpPipeline getHttpPipeline() { - return blobServiceAsyncClient.getHttpPipeline(); + return azureBlobStorage.getHttpPipeline(); } /** @@ -92,7 +172,7 @@ public HttpPipeline getHttpPipeline() { * @return the service version the client is using. */ public BlobServiceVersion getServiceVersion() { - return this.blobServiceAsyncClient.getServiceVersion(); + return serviceVersion; } /** @@ -246,7 +326,7 @@ public void deleteBlobContainer(String containerName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteBlobContainerWithResponse(String containerName, Context context) { - return blobServiceAsyncClient.deleteBlobContainerWithResponse(containerName, context).block(); + return getBlobContainerClient(containerName).deleteWithResponse(null, null, context); } /** @@ -298,7 +378,7 @@ public boolean deleteBlobContainerIfExists(String containerName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteBlobContainerIfExistsWithResponse(String containerName, Context context) { - return blobServiceAsyncClient.deleteBlobContainerIfExistsWithResponse(containerName, context).block(); + return getBlobContainerClient(containerName).deleteIfExistsWithResponse(null, null, context); } /** @@ -307,7 +387,7 @@ public Response deleteBlobContainerIfExistsWithResponse(String containe * @return the URL. */ public String getAccountUrl() { - return blobServiceAsyncClient.getAccountUrl(); + return azureBlobStorage.getUrl(); } /** @@ -355,7 +435,28 @@ public PagedIterable listBlobContainers() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBlobContainers(ListBlobContainersOptions options, Duration timeout) { - return new PagedIterable<>(blobServiceAsyncClient.listBlobContainersWithOptionalTimeout(options, timeout)); + throwOnAnonymousAccess(); + BiFunction> pageRetriever = (marker, pageSize) -> { + ListBlobContainersOptions finalOptions = options != null ? options : new ListBlobContainersOptions(); + + if (pageSize != null) { + finalOptions.setMaxResultsPerPage(pageSize); + } + + return listBlobContainersSegment(marker, finalOptions, timeout); + }; + return new PagedIterable<>(() -> pageRetriever.apply(null, null), marker -> pageRetriever.apply(marker, null)); + + } + + private PagedResponse listBlobContainersSegment(String marker, ListBlobContainersOptions options, Duration timeout) { + // Set up the include types based on the details provided in the options + List include = ModelHelper.toIncludeTypes(options.getDetails()); + + Callable> operation = () -> this.azureBlobStorage.getServices() + .listBlobContainersSegmentSinglePage(options.getPrefix(), marker, options.getMaxResultsPerPage(), include, + null, null, Context.NONE); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -402,7 +503,42 @@ public PagedIterable findBlobsByTags(String query) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable findBlobsByTags(FindBlobsOptions options, Duration timeout, Context context) { - return new PagedIterable<>(blobServiceAsyncClient.findBlobsByTags(options, timeout, context)); + throwOnAnonymousAccess(); + StorageImplUtils.assertNotNull("options", options); + BiFunction> func = (marker, pageSize) -> { + int finalPageSize = (pageSize != null) ? pageSize : (options.getMaxResultsPerPage() != null + ? options.getMaxResultsPerPage() : Integer.MAX_VALUE); + options.setMaxResultsPerPage(finalPageSize); + return findBlobsByTagsHelper(options, marker, timeout, context); + }; + return new PagedIterable<>(() -> func.apply(null, null), marker -> func.apply(marker, null)); + } + + private PagedResponse findBlobsByTagsHelper(FindBlobsOptions options, String marker, + Duration timeout, Context context) { + Context finalContext = context == null ? Context.NONE : context; + + StorageImplUtils.assertNotNull("options", options); + Callable> operation = () -> + this.azureBlobStorage.getServices().filterBlobsWithResponse(null, null, options.getQuery(), marker, + options.getMaxResultsPerPage(), null, finalContext); + + ResponseBase response = + StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + + List value = response.getValue().getBlobs() == null + ? Collections.emptyList() + : response.getValue().getBlobs().stream() + .map(ModelHelper::populateTaggedBlobItem) + .collect(Collectors.toList()); + + return new PagedResponseBase<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + value, + response.getValue().getNextMarker(), + response.getDeserializedHeaders()); } /** @@ -451,10 +587,14 @@ public BlobServiceProperties getProperties() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getPropertiesWithResponse(Duration timeout, Context context) { + Context finalContext = context == null ? Context.NONE : context; + throwOnAnonymousAccess(); + Callable> operation = () -> + this.azureBlobStorage.getServices().getPropertiesWithResponse(null, null, finalContext); + ResponseBase response = + StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); - Mono> response = blobServiceAsyncClient.getPropertiesWithResponse(context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + return new SimpleResponse<>(response, response.getValue()); } /** @@ -552,9 +692,68 @@ public void setProperties(BlobServiceProperties properties) { @ServiceMethod(returns = ReturnType.SINGLE) public Response setPropertiesWithResponse(BlobServiceProperties properties, Duration timeout, Context context) { - Mono> response = blobServiceAsyncClient.setPropertiesWithResponse(properties, context); + throwOnAnonymousAccess(); + BlobServiceProperties finalProperties; + if (properties != null) { + finalProperties = new BlobServiceProperties(); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + // Logging + finalProperties.setLogging(properties.getLogging()); + if (finalProperties.getLogging() != null) { + StorageImplUtils.assertNotNull("Logging Version", finalProperties.getLogging().getVersion()); + ModelHelper.validateRetentionPolicy(finalProperties.getLogging().getRetentionPolicy(), "Logging Retention Policy"); + } + + // Hour Metrics + finalProperties.setHourMetrics(properties.getHourMetrics()); + if (finalProperties.getHourMetrics() != null) { + StorageImplUtils.assertNotNull("HourMetrics Version", finalProperties.getHourMetrics().getVersion()); + ModelHelper.validateRetentionPolicy(finalProperties.getHourMetrics().getRetentionPolicy(), "HourMetrics Retention " + + "Policy"); + if (finalProperties.getHourMetrics().isEnabled()) { + StorageImplUtils.assertNotNull("HourMetrics IncludeApis", + finalProperties.getHourMetrics().isIncludeApis()); + } + } + + // Minute Metrics + finalProperties.setMinuteMetrics(properties.getMinuteMetrics()); + if (finalProperties.getMinuteMetrics() != null) { + StorageImplUtils.assertNotNull("MinuteMetrics Version", + finalProperties.getMinuteMetrics().getVersion()); + ModelHelper.validateRetentionPolicy(finalProperties.getMinuteMetrics().getRetentionPolicy(), "MinuteMetrics " + + "Retention Policy"); + if (finalProperties.getMinuteMetrics().isEnabled()) { + StorageImplUtils.assertNotNull("MinuteMetrics IncludeApis", + finalProperties.getHourMetrics().isIncludeApis()); + } + } + + // CORS + if (properties.getCors() != null) { + List corsRules = new ArrayList<>(); + for (BlobCorsRule rule : properties.getCors()) { + corsRules.add(ModelHelper.validatedCorsRule(rule)); + } + finalProperties.setCors(corsRules); + } + + // Default Service Version + finalProperties.setDefaultServiceVersion(properties.getDefaultServiceVersion()); + + // Delete Retention Policy + finalProperties.setDeleteRetentionPolicy(properties.getDeleteRetentionPolicy()); + ModelHelper.validateRetentionPolicy(finalProperties.getDeleteRetentionPolicy(), "DeleteRetentionPolicy Days"); + + // Static Website + finalProperties.setStaticWebsite(properties.getStaticWebsite()); + } else { + finalProperties = null; + } + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> this.azureBlobStorage.getServices() + .setPropertiesNoCustomHeadersWithResponse(finalProperties, null, null, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -601,10 +800,20 @@ public UserDelegationKey getUserDelegationKey(OffsetDateTime start, OffsetDateTi @ServiceMethod(returns = ReturnType.SINGLE) public Response getUserDelegationKeyWithResponse(OffsetDateTime start, OffsetDateTime expiry, Duration timeout, Context context) { - Mono> response = blobServiceAsyncClient.getUserDelegationKeyWithResponse(start, - expiry, context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + StorageImplUtils.assertNotNull("expiry", expiry); + if (start != null && !start.isBefore(expiry)) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("`start` must be null or a datetime before `expiry`.")); + } + throwOnAnonymousAccess(); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getServices().getUserDelegationKeyWithResponse(new KeyInfo() + .setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) + .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), null, null, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, response.getValue()); } /** @@ -650,9 +859,11 @@ public BlobServiceStatistics getStatistics() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getStatisticsWithResponse(Duration timeout, Context context) { - Mono> response = blobServiceAsyncClient.getStatisticsWithResponse(context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + throwOnAnonymousAccess(); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getServices().getStatisticsWithResponse(null, null, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -686,9 +897,15 @@ public StorageAccountInfo getAccountInfo() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAccountInfoWithResponse(Duration timeout, Context context) { - Mono> response = blobServiceAsyncClient.getAccountInfoWithResponse(context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + throwOnAnonymousAccess(); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getServices().getAccountInfoWithResponse(finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + ServicesGetAccountInfoHeaders hd = response.getDeserializedHeaders(); + return new SimpleResponse<>(response, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(), + hd.isXMsIsHnsEnabled())); } /** @@ -697,7 +914,17 @@ public Response getAccountInfoWithResponse(Duration timeout, * @return account name associated with this storage resource. */ public String getAccountName() { - return this.blobServiceAsyncClient.getAccountName(); + return this.accountName; + } + + /** + * Checks if service client was built with credentials. + */ + private void throwOnAnonymousAccess() { + if (anonymousAccess) { + throw LOGGER.logExceptionAsError(new IllegalStateException("Service client cannot be accessed without " + + "credentials")); + } } /** @@ -730,7 +957,7 @@ public String getAccountName() { * @return A {@code String} representing the SAS query parameters. */ public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues) { - return this.blobServiceAsyncClient.generateAccountSas(accountSasSignatureValues); + return generateAccountSas(accountSasSignatureValues, Context.NONE); } /* TODO(gapra): REST Docs*/ @@ -765,8 +992,10 @@ public String generateAccountSas(AccountSasSignatureValues accountSasSignatureVa * @return A {@code String} representing the SAS query parameters. */ public String generateAccountSas(AccountSasSignatureValues accountSasSignatureValues, Context context) { - return this.blobServiceAsyncClient.generateAccountSas(accountSasSignatureValues, context); - } + throwOnAnonymousAccess(); + return new AccountSasImplUtil(accountSasSignatureValues, + this.encryptionScope == null ? null : this.encryptionScope.getEncryptionScope()) + .generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), context); } /** * Restores a previously deleted container. @@ -833,13 +1062,20 @@ public BlobContainerClient undeleteBlobContainer(String deletedContainerName, St * to interact with the restored container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response undeleteBlobContainerWithResponse( - UndeleteBlobContainerOptions options, Duration timeout, Context context) { - Mono> response = - this.blobServiceAsyncClient.undeleteBlobContainerWithResponse(options, context) - .map(r -> new SimpleResponse<>(r, getBlobContainerClient(r.getValue().getBlobContainerName()))); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + public Response undeleteBlobContainerWithResponse(UndeleteBlobContainerOptions options, + Duration timeout, Context context) { + StorageImplUtils.assertNotNull("options", options); + boolean hasOptionalDestinationContainerName = options.getDestinationContainerName() != null; + String finalDestinationContainerName = + hasOptionalDestinationContainerName ? options.getDestinationContainerName() + : options.getDeletedContainerName(); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getContainers().restoreWithResponse(finalDestinationContainerName, null, null, + options.getDeletedContainerName(), options.getDeletedContainerVersion(), finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, getBlobContainerClient(finalDestinationContainerName)); } // /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java index 226f3b6dc903d..663ad41d0cbe0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClientBuilder.java @@ -96,6 +96,7 @@ public final class BlobServiceClientBuilder implements private Configuration configuration; private BlobServiceVersion version; private BlobAudience audience; + private boolean anonymousAccess; /** * Creates a builder instance that is able to configure and construct {@link BlobServiceClient BlobServiceClients} @@ -113,7 +114,44 @@ public BlobServiceClientBuilder() { * and {@link #retryOptions(RequestRetryOptions)} have been set. */ public BlobServiceClient buildClient() { - return new BlobServiceClient(buildAsyncClient()); + BuilderHelper.httpsValidation(customerProvidedKey, "customer provided key", endpoint, LOGGER); + + anonymousAccess = false; + + if (Objects.nonNull(customerProvidedKey) && Objects.nonNull(encryptionScope)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Customer provided key and encryption " + + "scope cannot both be set")); + } + + BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); + HttpPipeline pipeline = constructPipeline(); + + boolean foundCredential = false; + for (int i = 0; i < pipeline.getPolicyCount(); i++) { + if (pipeline.getPolicy(i) instanceof StorageSharedKeyCredentialPolicy) { + foundCredential = true; + break; + } + if (pipeline.getPolicy(i) instanceof BearerTokenAuthenticationPolicy) { + foundCredential = true; + break; + } + if (pipeline.getPolicy(i) instanceof AzureSasCredentialPolicy) { + foundCredential = true; + break; + } + } + anonymousAccess = !foundCredential; + + return new BlobServiceClient(pipeline, endpoint, serviceVersion, accountName, customerProvidedKey, + encryptionScope, blobContainerEncryptionScope, anonymousAccess); + } + + private HttpPipeline constructPipeline() { + return (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline( + storageSharedKeyCredential, tokenCredential, azureSasCredential, sasToken, + endpoint, retryOptions, coreRetryOptions, logOptions, + clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, audience, LOGGER); } /** @@ -126,7 +164,7 @@ public BlobServiceClient buildClient() { public BlobServiceAsyncClient buildAsyncClient() { BuilderHelper.httpsValidation(customerProvidedKey, "customer provided key", endpoint, LOGGER); - boolean anonymousAccess = false; + anonymousAccess = false; if (Objects.nonNull(customerProvidedKey) && Objects.nonNull(encryptionScope)) { throw LOGGER.logExceptionAsError(new IllegalArgumentException("Customer provided key and encryption " @@ -134,10 +172,7 @@ public BlobServiceAsyncClient buildAsyncClient() { } BlobServiceVersion serviceVersion = version != null ? version : BlobServiceVersion.getLatest(); - HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline( - storageSharedKeyCredential, tokenCredential, azureSasCredential, sasToken, - endpoint, retryOptions, coreRetryOptions, logOptions, - clientOptions, httpClient, perCallPolicies, perRetryPolicies, configuration, audience, LOGGER); + HttpPipeline pipeline = constructPipeline(); boolean foundCredential = false; for (int i = 0; i < pipeline.getPolicyCount(); i++) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index 48084067c4f23..ff4f7e44a9953 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.implementation.util; +import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.RequestConditions; @@ -10,6 +11,7 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.implementation.accesshelpers.BlobDownloadHeadersConstructorProxy; import com.azure.storage.blob.implementation.accesshelpers.BlobItemConstructorProxy; @@ -24,25 +26,37 @@ import com.azure.storage.blob.implementation.models.BlobsQueryHeaders; import com.azure.storage.blob.implementation.models.FilterBlobItem; import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions; +import com.azure.storage.blob.models.BlobContainerListDetails; +import com.azure.storage.blob.models.BlobCorsRule; import com.azure.storage.blob.models.BlobDownloadAsyncResponse; import com.azure.storage.blob.models.BlobDownloadHeaders; import com.azure.storage.blob.models.BlobDownloadResponse; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.models.BlobLeaseRequestConditions; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.BlobQueryHeaders; import com.azure.storage.blob.models.BlobRequestConditions; +import com.azure.storage.blob.models.BlobRetentionPolicy; +import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.CopyStatusType; +import com.azure.storage.blob.models.ListBlobContainersIncludeType; import com.azure.storage.blob.models.ObjectReplicationPolicy; import com.azure.storage.blob.models.ObjectReplicationRule; import com.azure.storage.blob.models.ObjectReplicationStatus; import com.azure.storage.blob.models.PageBlobCopyIncrementalRequestConditions; +import com.azure.storage.blob.models.PageRange; import com.azure.storage.blob.models.ParallelTransferOptions; import com.azure.storage.blob.models.TaggedBlobItem; import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; +import com.azure.storage.common.implementation.StorageImplUtils; +import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLEncoder; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; @@ -65,6 +79,11 @@ public final class ModelHelper { private static final HttpHeaderName X_MS_ERROR_CODE = HttpHeaderName.fromString("x-ms-error-code"); + /** + * Indicates the number of bytes in a page. + */ + public static final int PAGE_BYTES = 512; + /** * Determines whether the passed authority is IP style, that is, it is of the format {@code :}. * @@ -466,6 +485,171 @@ public static long getBlobLength(BlobDownloadHeaders headers) { : ChunkedDownloadUtils.extractTotalBlobLength(headers.getContentRange()); } + public static boolean checkBlobDoesNotExistStatusCode(Throwable t) { + if (t instanceof BlobStorageException) { + BlobStorageException s = (BlobStorageException) t; + return s.getStatusCode() == 404 + && (s.getErrorCode() == BlobErrorCode.RESOURCE_NOT_FOUND + || s.getErrorCode() == BlobErrorCode.BLOB_NOT_FOUND); + /* HttpResponseException - file get properties is a head request so a body is not returned. Error + conversion logic does not properly handle errors that don't return XML. */ + } else if (t instanceof HttpResponseException) { + HttpResponseException h = (HttpResponseException) t; + String errorCode = h.getResponse().getHeaderValue(X_MS_ERROR_CODE); + return h.getResponse().getStatusCode() == 404 + && (BlobErrorCode.RESOURCE_NOT_FOUND.toString().equals(errorCode) + || BlobErrorCode.BLOB_NOT_FOUND.toString().equals(errorCode)); + } else { + return false; + } + } + + public static boolean checkContainerDoesNotExistStatusCode(Throwable t) { + if (t instanceof BlobStorageException) { + BlobStorageException s = (BlobStorageException) t; + return s.getStatusCode() == 404 + && (s.getErrorCode() == BlobErrorCode.RESOURCE_NOT_FOUND + || s.getErrorCode() == BlobErrorCode.CONTAINER_NOT_FOUND); + /* HttpResponseException - file get properties is a head request so a body is not returned. Error + conversion logic does not properly handle errors that don't return XML. */ + } else if (t instanceof HttpResponseException) { + HttpResponseException h = (HttpResponseException) t; + String errorCode = h.getResponse().getHeaderValue(X_MS_ERROR_CODE); + return h.getResponse().getStatusCode() == 404 + && (BlobErrorCode.RESOURCE_NOT_FOUND.toString().equals(errorCode) + || BlobErrorCode.CONTAINER_NOT_FOUND.toString().equals(errorCode)); + } else { + return false; + } + } + + public static String tagsToString(Map tags) { + if (tags == null || tags.isEmpty()) { + return null; + } + StringBuilder sb = new StringBuilder(); + for (Map.Entry entry : tags.entrySet()) { + try { + sb.append(URLEncoder.encode(entry.getKey(), Charset.defaultCharset().toString())); + sb.append("="); + sb.append(URLEncoder.encode(entry.getValue(), Charset.defaultCharset().toString())); + sb.append("&"); + } catch (UnsupportedEncodingException e) { + throw LOGGER.logExceptionAsError(new IllegalStateException(e)); + } + } + + sb.deleteCharAt(sb.length() - 1); // Remove the last '&' + return sb.toString(); + } + + public static LongRunningOperationStatus mapStatusToLongRunningOperationStatus(CopyStatusType status) { + LongRunningOperationStatus operationStatus; + switch (status) { + case SUCCESS: + operationStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED; + break; + case FAILED: + operationStatus = LongRunningOperationStatus.FAILED; + break; + case ABORTED: + operationStatus = LongRunningOperationStatus.USER_CANCELLED; + break; + case PENDING: + operationStatus = LongRunningOperationStatus.IN_PROGRESS; + break; + default: + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "CopyStatusType is not supported. Status: " + status)); + } + return operationStatus; + } + + public static boolean validateNoETag(BlobRequestConditions modifiedRequestConditions) { + if (modifiedRequestConditions == null) { + return true; + } + return modifiedRequestConditions.getIfMatch() == null && modifiedRequestConditions.getIfNoneMatch() == null; + } + + /** + * Converts {@link BlobContainerListDetails} into list of {@link ListBlobContainersIncludeType} + * that contains only options selected. If no option is selected then null is returned. + * + * @return a list of selected options converted into {@link ListBlobContainersIncludeType}, null if none + * of options has been selected. + */ + public static List toIncludeTypes(BlobContainerListDetails blobContainerListDetails) { + boolean hasDetails = blobContainerListDetails != null + && (blobContainerListDetails.getRetrieveMetadata() + || blobContainerListDetails.getRetrieveDeleted() + || blobContainerListDetails.getRetrieveSystemContainers()); + if (hasDetails) { + List flags = new ArrayList<>(3); + if (blobContainerListDetails.getRetrieveDeleted()) { + flags.add(ListBlobContainersIncludeType.DELETED); + } + if (blobContainerListDetails.getRetrieveMetadata()) { + flags.add(ListBlobContainersIncludeType.METADATA); + } + if (blobContainerListDetails.getRetrieveSystemContainers()) { + flags.add(ListBlobContainersIncludeType.SYSTEM); + } + return flags; + } else { + return null; + } + } + + /** + * Validates a {@link BlobRetentionPolicy} according to service specs for set properties. + * @param retentionPolicy {@link BlobRetentionPolicy} + * @param policyName The name of the variable for errors. + */ + public static void validateRetentionPolicy(BlobRetentionPolicy retentionPolicy, String policyName) { + if (retentionPolicy == null) { + return; + } + if (retentionPolicy.isEnabled()) { + StorageImplUtils.assertInBounds(policyName, retentionPolicy.getDays(), 1, 365); + } + } + + /** + * Sets any null fields to "" since the service requires all Cors rules to be set if some are set. + * @param originalRule {@link BlobCorsRule} + * @return The validated {@link BlobCorsRule} + */ + public static BlobCorsRule validatedCorsRule(BlobCorsRule originalRule) { + if (originalRule == null) { + return null; + } + BlobCorsRule validRule = new BlobCorsRule(); + validRule.setAllowedHeaders(StorageImplUtils.emptyIfNull(originalRule.getAllowedHeaders())); + validRule.setAllowedMethods(StorageImplUtils.emptyIfNull(originalRule.getAllowedMethods())); + validRule.setAllowedOrigins(StorageImplUtils.emptyIfNull(originalRule.getAllowedOrigins())); + validRule.setExposedHeaders(StorageImplUtils.emptyIfNull(originalRule.getExposedHeaders())); + validRule.setMaxAgeInSeconds(originalRule.getMaxAgeInSeconds()); + return validRule; + } + + public static String pageRangeToString(PageRange pageRange) { + if (pageRange.getStart() < 0 || pageRange.getEnd() <= 0) { + throw new IllegalArgumentException("PageRange's start and end values must be greater than or equal to " + + "0 if specified."); + } + if (pageRange.getStart() % PAGE_BYTES != 0) { + throw new IllegalArgumentException("PageRange's start value must be a multiple of 512."); + } + if (pageRange.getEnd() % PAGE_BYTES != PAGE_BYTES - 1) { + throw new IllegalArgumentException("PageRange's end value must be 1 less than a multiple of 512."); + } + if (pageRange.getEnd() <= pageRange.getStart()) { + throw new IllegalArgumentException("PageRange's End value must be after the start."); + } + return "bytes=" + pageRange.getStart() + '-' + pageRange.getEnd(); + } + private ModelHelper() { } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index 34f32e9db2f15..129d6a7636881 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -22,6 +22,7 @@ import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AppendBlobItem; import com.azure.storage.blob.models.AppendBlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; @@ -290,7 +291,7 @@ Mono> createWithResponse(AppendBlobCreateOptions option options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), + ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context) .map(rb -> { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index b7d2e0256fa8e..803c5d4a73724 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -7,19 +7,32 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.exception.UnexpectedLengthException; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobClientBuilder; import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.BlobServiceClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; +import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AppendBlobItem; import com.azure.storage.blob.models.AppendBlobRequestConditions; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobImmutabilityPolicy; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.blob.options.AppendBlobAppendBlockFromUrlOptions; import com.azure.storage.blob.options.AppendBlobCreateOptions; @@ -30,13 +43,22 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.io.IOException; import java.io.InputStream; +import java.net.HttpURLConnection; import java.nio.ByteBuffer; import java.time.Duration; +import java.util.Arrays; import java.util.Map; import java.util.Objects; +import java.util.concurrent.Callable; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; +import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** * Client to an append blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the @@ -53,7 +75,7 @@ */ @ServiceClient(builder = SpecializedBlobClientBuilder.class) public final class AppendBlobClient extends BlobClientBase { - + private static final ClientLogger LOGGER = new ClientLogger(AppendBlobClient.class); private final AppendBlobAsyncClient appendBlobAsyncClient; /** @@ -61,30 +83,29 @@ public final class AppendBlobClient extends BlobClientBase { * @deprecated use {@link AppendBlobClient#getMaxAppendBlockBytes()}. */ @Deprecated - public static final int MAX_APPEND_BLOCK_BYTES = AppendBlobAsyncClient.MAX_APPEND_BLOCK_BYTES; + public static final int MAX_APPEND_BLOCK_BYTES = 4 * Constants.MB; /** * Indicates the maximum number of blocks allowed in an append blob. * @deprecated use {@link AppendBlobClient#getMaxBlocks()}. */ @Deprecated - public static final int MAX_BLOCKS = AppendBlobAsyncClient.MAX_BLOCKS; + public static final int MAX_BLOCKS = 50000; /** * Indicates the maximum number of bytes that can be sent in a call to appendBlock. */ - static final int MAX_APPEND_BLOCK_BYTES_VERSIONS_2021_12_02_AND_BELOW = AppendBlobAsyncClient.MAX_APPEND_BLOCK_BYTES_VERSIONS_2021_12_02_AND_BELOW; + static final int MAX_APPEND_BLOCK_BYTES_VERSIONS_2021_12_02_AND_BELOW = 4 * Constants.MB; /** * Indicates the maximum number of bytes that can be sent in a call to appendBlock. * For versions 2022-11-02 and above. */ - static final int MAX_APPEND_BLOCK_BYTES_VERSIONS_2022_11_02_AND_ABOVE = AppendBlobAsyncClient.MAX_APPEND_BLOCK_BYTES_VERSIONS_2022_11_02_AND_ABOVE; - + static final int MAX_APPEND_BLOCK_BYTES_VERSIONS_2022_11_02_AND_ABOVE = 100 * Constants.MB; /** * Indicates the maximum number of blocks allowed in an append blob. */ - static final int MAX_APPEND_BLOCKS = AppendBlobAsyncClient.MAX_APPEND_BLOCKS; + static final int MAX_APPEND_BLOCKS = 50000; /** * Package-private constructor for use by {@link BlobClientBuilder}. @@ -92,8 +113,36 @@ public final class AppendBlobClient extends BlobClientBase { * @param appendBlobAsyncClient the async append blob client */ AppendBlobClient(AppendBlobAsyncClient appendBlobAsyncClient) { - super(appendBlobAsyncClient); - this.appendBlobAsyncClient = appendBlobAsyncClient; + this(appendBlobAsyncClient, appendBlobAsyncClient.getHttpPipeline(), appendBlobAsyncClient.getAccountUrl(), + appendBlobAsyncClient.getServiceVersion(), appendBlobAsyncClient.getAccountName(), + appendBlobAsyncClient.getContainerName(), appendBlobAsyncClient.getBlobName(), + appendBlobAsyncClient.getSnapshotId(), appendBlobAsyncClient.getCustomerProvidedKey(), + new EncryptionScope().setEncryptionScope(appendBlobAsyncClient.getEncryptionScope()), + appendBlobAsyncClient.getVersionId()); + } + + /** + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param versionId The version identifier for the blob, pass {@code null} to interact with the latest blob version. + */ + AppendBlobClient(AppendBlobAsyncClient asyncClient, HttpPipeline pipeline, String url, + BlobServiceVersion serviceVersion, String accountName, String containerName, String blobName, String snapshot, + CpkInfo customerProvidedKey, EncryptionScope encryptionScope, String versionId) { + super(asyncClient, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, + encryptionScope, versionId); + this.appendBlobAsyncClient = asyncClient; } /** @@ -104,7 +153,13 @@ public final class AppendBlobClient extends BlobClientBase { */ @Override public AppendBlobClient getEncryptionScopeClient(String encryptionScope) { - return new AppendBlobClient(appendBlobAsyncClient.getEncryptionScopeAsyncClient(encryptionScope)); + EncryptionScope finalEncryptionScope = null; + if (encryptionScope != null) { + finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); + } + return new AppendBlobClient(this.appendBlobAsyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), + finalEncryptionScope, getVersionId()); } /** @@ -116,7 +171,16 @@ public AppendBlobClient getEncryptionScopeClient(String encryptionScope) { */ @Override public AppendBlobClient getCustomerProvidedKeyClient(CustomerProvidedKey customerProvidedKey) { - return new AppendBlobClient(appendBlobAsyncClient.getCustomerProvidedKeyAsyncClient(customerProvidedKey)); + CpkInfo finalCustomerProvidedKey = null; + if (customerProvidedKey != null) { + finalCustomerProvidedKey = new CpkInfo() + .setEncryptionKey(customerProvidedKey.getKey()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) + .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); + } + return new AppendBlobClient(this.appendBlobAsyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), finalCustomerProvidedKey, + encryptionScope, getVersionId()); } /** @@ -278,8 +342,27 @@ public Response createWithResponse(BlobHttpHeaders headers, Map< @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(AppendBlobCreateOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(appendBlobAsyncClient. - createWithResponse(options, context), timeout); + AppendBlobCreateOptions finalOptions = (options == null) ? new AppendBlobCreateOptions() : options; + BlobRequestConditions requestConditions = finalOptions.getRequestConditions() == null + ? new BlobRequestConditions() : finalOptions.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + BlobImmutabilityPolicy immutabilityPolicy = finalOptions.getImmutabilityPolicy() == null + ? new BlobImmutabilityPolicy() : finalOptions.getImmutabilityPolicy(); + Callable> operation = () -> + this.azureBlobStorage.getAppendBlobs().createWithResponse(containerName, blobName, 0, null, + finalOptions.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, + ModelHelper.tagsToString(finalOptions.getTags()), immutabilityPolicy.getExpiryTime(), + immutabilityPolicy.getPolicyMode(), finalOptions.hasLegalHold(), finalOptions.getHeaders(), + getCustomerProvidedKey(), encryptionScope, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + AppendBlobsCreateHeaders hd = response.getDeserializedHeaders(); + AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), hd.getXMsEncryptionScope(), null, null, + hd.getXMsVersionId()); + return new SimpleResponse<>(response, item); } /** @@ -336,8 +419,22 @@ public AppendBlobItem createIfNotExists() { @ServiceMethod(returns = ReturnType.SINGLE) public Response createIfNotExistsWithResponse(AppendBlobCreateOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(appendBlobAsyncClient. - createIfNotExistsWithResponse(options, context), timeout); + AppendBlobCreateOptions finalOptions = options == null ? new AppendBlobCreateOptions() : options; + finalOptions.setRequestConditions(new AppendBlobRequestConditions() + .setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD)); + try { + return createWithResponse(finalOptions, timeout, context); + } catch (BlobStorageException e) { + if (e.getStatusCode() == 409 && (e.getErrorCode().equals(BlobErrorCode.BLOB_ALREADY_EXISTS) + || e.getErrorCode().equals(BlobErrorCode.RESOURCE_ALREADY_EXISTS))) { + HttpResponse res = e.getResponse(); + return new SimpleResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), null); + } else { + throw LOGGER.logExceptionAsError(e); + } + } catch (RuntimeException e) { + throw LOGGER.logExceptionAsError(e); + } } /** @@ -577,9 +674,18 @@ public void seal() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response sealWithResponse(AppendBlobSealOptions options, Duration timeout, Context context) { - Mono> response = appendBlobAsyncClient.sealWithResponse(options, context); - - return blockWithOptionalTimeout(response, timeout); + AppendBlobSealOptions finalOptions = (options == null) ? new AppendBlobSealOptions() : options; + + AppendBlobRequestConditions requestConditions = (finalOptions.getRequestConditions() == null) + ? new AppendBlobRequestConditions() : finalOptions.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> this.azureBlobStorage.getAppendBlobs() + .sealNoCustomHeadersWithResponse(containerName, blobName, null, null, requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getAppendPosition(), finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -589,7 +695,7 @@ public Response sealWithResponse(AppendBlobSealOptions options, Duration t * @return the max number of block bytes that can be uploaded based on service version. */ public int getMaxAppendBlockBytes() { - if (appendBlobAsyncClient.getServiceVersion().ordinal() < BlobServiceVersion.V2022_11_02.ordinal()) { + if (getServiceVersion().ordinal() < BlobServiceVersion.V2022_11_02.ordinal()) { return MAX_APPEND_BLOCK_BYTES_VERSIONS_2021_12_02_AND_BELOW; } else { return MAX_APPEND_BLOCK_BYTES_VERSIONS_2022_11_02_AND_ABOVE; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index dc1d83a10c14f..2564415dab8a6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -760,7 +760,7 @@ private Mono onStart(String sourceUrl, Map metadat destinationRequestConditions.getIfModifiedSince(), destinationRequestConditions.getIfUnmodifiedSince(), destinationRequestConditions.getIfMatch(), destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getTagsConditions(), destinationRequestConditions.getLeaseId(), null, - tagsToString(tags), sealBlob, immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), + ModelHelper.tagsToString(tags), sealBlob, immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), legalHold, context)) .map(response -> { final BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); @@ -771,26 +771,6 @@ private Mono onStart(String sourceUrl, Map metadat }); } - String tagsToString(Map tags) { - if (tags == null || tags.isEmpty()) { - return null; - } - StringBuilder sb = new StringBuilder(); - for (Map.Entry entry : tags.entrySet()) { - try { - sb.append(URLEncoder.encode(entry.getKey(), Charset.defaultCharset().toString())); - sb.append("="); - sb.append(URLEncoder.encode(entry.getValue(), Charset.defaultCharset().toString())); - sb.append("&"); - } catch (UnsupportedEncodingException e) { - throw LOGGER.logExceptionAsError(new IllegalStateException(e)); - } - } - - sb.deleteCharAt(sb.length() - 1); // Remove the last '&' - return sb.toString(); - } - private Mono> onPoll(PollResponse pollResponse) { if (pollResponse.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED || pollResponse.getStatus() == LongRunningOperationStatus.FAILED) { @@ -1030,7 +1010,7 @@ Mono> copyFromUrlWithResponse(BlobCopyFromUrlOptions options, C destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), destRequestConditions.getLeaseId(), null, null, - tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), + ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), sourceAuth, options.getCopySourceTagsMode(), this.encryptionScope, context) .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsCopyId())); } @@ -2386,8 +2366,7 @@ public Mono> getAccountInfoWithResponse() { } Mono> getAccountInfoWithResponse(Context context) { - return this.azureBlobStorage.getBlobs().getAccountInfoWithResponseAsync(containerName, blobName, null, - null, context) + return this.azureBlobStorage.getBlobs().getAccountInfoWithResponseAsync(containerName, blobName, context) .map(rb -> { BlobsGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); return new SimpleResponse<>(rb, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind())); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index b079f033c4324..b230a9ffa3020 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -5,22 +5,52 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.BinaryData; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; +import com.azure.core.util.polling.PollingContext; import com.azure.core.util.polling.SyncPoller; import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.BlobContainerClientBuilder; import com.azure.storage.blob.BlobServiceClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; +import com.azure.storage.blob.implementation.models.BlobPropertiesInternalGetProperties; +import com.azure.storage.blob.implementation.models.BlobTag; +import com.azure.storage.blob.implementation.models.BlobTags; +import com.azure.storage.blob.implementation.models.BlobsCopyFromURLHeaders; +import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders; +import com.azure.storage.blob.implementation.models.BlobsQueryHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders; +import com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders; +import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.models.InternalBlobLegalHoldResult; +import com.azure.storage.blob.implementation.models.QueryRequest; +import com.azure.storage.blob.implementation.models.QuerySerialization; +import com.azure.storage.blob.implementation.util.BlobQueryReader; +import com.azure.storage.blob.implementation.util.BlobRequestConditionProperty; +import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.implementation.util.ChunkedDownloadUtils; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions; import com.azure.storage.blob.models.BlobCopyInfo; import com.azure.storage.blob.models.BlobDownloadAsyncResponse; import com.azure.storage.blob.models.BlobDownloadContentAsyncResponse; @@ -28,6 +58,7 @@ import com.azure.storage.blob.models.BlobDownloadResponse; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobImmutabilityPolicy; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.models.BlobLegalHoldResult; import com.azure.storage.blob.models.BlobProperties; import com.azure.storage.blob.models.BlobQueryAsyncResponse; @@ -37,6 +68,7 @@ import com.azure.storage.blob.models.BlobSeekableByteChannelReadResult; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.ConsistentReadControl; +import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; @@ -56,8 +88,9 @@ import com.azure.storage.blob.options.BlobSetTagsOptions; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; -import com.azure.storage.common.implementation.FluxInputStream; +import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.implementation.StorageSeekableByteChannel; import com.fasterxml.jackson.databind.util.ByteBufferBackedOutputStream; @@ -67,6 +100,8 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.UncheckedIOException; +import java.net.MalformedURLException; +import java.net.URI; import java.net.URL; import java.nio.ByteBuffer; import java.nio.channels.SeekableByteChannel; @@ -75,12 +110,22 @@ import java.nio.file.StandardOpenOption; import java.time.Duration; import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.EnumSet; +import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiFunction; +import java.util.function.Function; import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; +import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** * This class provides a client that contains all operations that apply to any blob type. @@ -91,6 +136,42 @@ */ public class BlobClientBase { private static final ClientLogger LOGGER = new ClientLogger(BlobClientBase.class); + private static final Set DEFAULT_OPEN_OPTIONS_SET = Collections.unmodifiableSet(new HashSet<>( + Arrays.asList(StandardOpenOption.CREATE_NEW, StandardOpenOption.READ, StandardOpenOption.WRITE))); + + /** + * Backing REST client for the blob client. + */ + protected final AzureBlobStorageImpl azureBlobStorage; + + private final String snapshot; + private final String versionId; + private final CpkInfo customerProvidedKey; + + /** + * Encryption scope of the blob. + */ + protected final EncryptionScope encryptionScope; + + /** + * Storage account name that contains the blob. + */ + protected final String accountName; + + /** + * Container name that contains the blob. + */ + protected final String containerName; + + /** + * Name of the blob. + */ + protected final String blobName; + + /** + * Storage REST API version used in requests to the Storage service. + */ + protected final BlobServiceVersion serviceVersion; private final BlobAsyncClientBase client; @@ -100,7 +181,57 @@ public class BlobClientBase { * @param client the async blob client */ protected BlobClientBase(BlobAsyncClientBase client) { + this(client, client.getHttpPipeline(), client.getAccountUrl(), client.getServiceVersion(), + client.getAccountName(), client.getContainerName(), client.getBlobName(), client.getSnapshotId(), + client.getCustomerProvidedKey(), new EncryptionScope().setEncryptionScope(client.getEncryptionScope()), + client.getVersionId()); + } + + /** + * Protected constructor for use by {@link SpecializedBlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param versionId The version identifier for the blob, pass {@code null} to interact with the latest blob version. + */ + protected BlobClientBase(BlobAsyncClientBase client, HttpPipeline pipeline, String url, + BlobServiceVersion serviceVersion, String accountName, String containerName, String blobName, String snapshot, + CpkInfo customerProvidedKey, EncryptionScope encryptionScope, String versionId) { + if (snapshot != null && versionId != null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("'snapshot' and 'versionId' cannot be used at the same time.")); + } this.client = client; + this.azureBlobStorage = new AzureBlobStorageImplBuilder() + .pipeline(pipeline) + .url(url) + .version(serviceVersion.getVersion()) + .buildClient(); + this.serviceVersion = serviceVersion; + + this.accountName = accountName; + this.containerName = containerName; + this.blobName = blobName; + this.snapshot = snapshot; + this.customerProvidedKey = customerProvidedKey; + this.encryptionScope = encryptionScope; + this.versionId = versionId; + /* Check to make sure the uri is valid. We don't want the error to occur later in the generated layer + when the sas token has already been applied. */ + try { + URI.create(getBlobUrl()); + } catch (IllegalArgumentException ex) { + throw LOGGER.logExceptionAsError(ex); + } } /** @@ -110,7 +241,10 @@ protected BlobClientBase(BlobAsyncClientBase client) { * @return a {@link BlobClientBase} used to interact with the specific snapshot. */ public BlobClientBase getSnapshotClient(String snapshot) { - return new BlobClientBase(client.getSnapshotClient(snapshot)); + return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), encryptionScope, + getVersionId()); + //return new BlobClientBase(client.getSnapshotClient(snapshot)); } /** @@ -121,7 +255,10 @@ public BlobClientBase getSnapshotClient(String snapshot) { * @return a {@link BlobClientBase} used to interact with the specific version. */ public BlobClientBase getVersionClient(String versionId) { - return new BlobClientBase(client.getVersionClient(versionId)); + return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), + encryptionScope, versionId); + //return new BlobClientBase(client.getVersionClient(versionId)); } /** @@ -131,7 +268,14 @@ public BlobClientBase getVersionClient(String versionId) { * @return a {@link BlobClientBase} with the specified {@code encryptionScope}. */ public BlobClientBase getEncryptionScopeClient(String encryptionScope) { - return new BlobClientBase(client.getEncryptionScopeAsyncClient(encryptionScope)); + EncryptionScope finalEncryptionScope = null; + if (encryptionScope != null) { + finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); + } + return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), + finalEncryptionScope, getVersionId()); + //return new BlobClientBase(client.getEncryptionScopeAsyncClient(encryptionScope)); } /** @@ -142,7 +286,17 @@ public BlobClientBase getEncryptionScopeClient(String encryptionScope) { * @return a {@link BlobClientBase} with the specified {@code customerProvidedKey}. */ public BlobClientBase getCustomerProvidedKeyClient(CustomerProvidedKey customerProvidedKey) { - return new BlobClientBase(client.getCustomerProvidedKeyAsyncClient(customerProvidedKey)); + CpkInfo finalCustomerProvidedKey = null; + if (customerProvidedKey != null) { + finalCustomerProvidedKey = new CpkInfo() + .setEncryptionKey(customerProvidedKey.getKey()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) + .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); + } + return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), snapshot, finalCustomerProvidedKey, encryptionScope, + getVersionId()); + //return new BlobClientBase(client.getCustomerProvidedKeyAsyncClient(customerProvidedKey)); } /** @@ -151,7 +305,7 @@ public BlobClientBase getCustomerProvidedKeyClient(CustomerProvidedKey customerP * @return the URL of the storage account */ public String getAccountUrl() { - return client.getAccountUrl(); + return azureBlobStorage.getUrl(); } /** @@ -160,7 +314,15 @@ public String getAccountUrl() { * @return the URL. */ public String getBlobUrl() { - return client.getBlobUrl(); + String blobUrl = azureBlobStorage.getUrl() + "/" + containerName + "/" + Utility.urlEncode(blobName); + if (this.isSnapshot()) { + blobUrl = Utility.appendQueryParameter(blobUrl, "snapshot", getSnapshotId()); + } + if (this.getVersionId() != null) { + blobUrl = Utility.appendQueryParameter(blobUrl, "versionid", getVersionId()); + } + return blobUrl; + //return client.getBlobUrl(); } /** @@ -169,7 +331,7 @@ public String getBlobUrl() { * @return account name associated with this storage resource. */ public String getAccountName() { - return client.getAccountName(); + return this.accountName; } /** @@ -187,7 +349,7 @@ public String getAccountName() { * @return The name of the container. */ public final String getContainerName() { - return client.getContainerName(); + return this.containerName; } /** @@ -205,7 +367,15 @@ public final String getContainerName() { * @return {@link BlobContainerClient} */ public BlobContainerClient getContainerClient() { - return client.getContainerClientBuilder().buildClient(); + CustomerProvidedKey encryptionKey = this.customerProvidedKey == null ? null + : new CustomerProvidedKey(this.customerProvidedKey.getEncryptionKey()); + return new BlobContainerClientBuilder() + .endpoint(this.getBlobUrl()) + .pipeline(this.getHttpPipeline()) + .serviceVersion(this.serviceVersion) + .customerProvidedKey(encryptionKey) + .encryptionScope(this.getEncryptionScope()).buildClient(); + //return client.getContainerClientBuilder().buildClient(); } /** @@ -223,7 +393,7 @@ public BlobContainerClient getContainerClient() { * @return The decoded name of the blob. */ public final String getBlobName() { - return client.getBlobName(); + return this.blobName; } /** @@ -232,7 +402,7 @@ public final String getBlobName() { * @return The pipeline. */ public HttpPipeline getHttpPipeline() { - return client.getHttpPipeline(); + return azureBlobStorage.getHttpPipeline(); } /** @@ -241,7 +411,7 @@ public HttpPipeline getHttpPipeline() { * @return the customer provided key used for encryption. */ public CpkInfo getCustomerProvidedKey() { - return client.getCustomerProvidedKey(); + return this.customerProvidedKey; } /** @@ -250,7 +420,11 @@ public CpkInfo getCustomerProvidedKey() { * @return the encryption scope used for encryption. */ public String getEncryptionScope() { - return client.getEncryptionScope(); + if (encryptionScope == null) { + return null; + } + return encryptionScope.getEncryptionScope(); + //return client.getEncryptionScope(); } /** @@ -259,7 +433,7 @@ public String getEncryptionScope() { * @return the service version the client is using. */ public BlobServiceVersion getServiceVersion() { - return client.getServiceVersion(); + return this.serviceVersion; } /** @@ -268,7 +442,7 @@ public BlobServiceVersion getServiceVersion() { * @return A string that represents the snapshotId of the snapshot blob */ public String getSnapshotId() { - return client.getSnapshotId(); + return this.snapshot; } /** @@ -277,7 +451,7 @@ public String getSnapshotId() { * @return A string that represents the versionId of the snapshot blob */ public String getVersionId() { - return client.getVersionId(); + return this.versionId; } /** @@ -286,7 +460,7 @@ public String getVersionId() { * @return A boolean that indicates if a blob is a snapshot */ public boolean isSnapshot() { - return client.isSnapshot(); + return this.snapshot != null; } /** @@ -496,9 +670,19 @@ public Boolean exists() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response existsWithResponse(Duration timeout, Context context) { - Mono> response = client.existsWithResponse(context); - - return blockWithOptionalTimeout(response, timeout); + try { + Callable> operation = () -> this.azureBlobStorage.getBlobs() + .getPropertiesNoCustomHeadersWithResponse(containerName, blobName, snapshot, versionId, null, null, + null, null, null, null, null, null, customerProvidedKey, context); + return new SimpleResponse<>(sendRequest(operation, timeout, BlobStorageException.class), true); + } catch (RuntimeException e) { + if (ModelHelper.checkBlobDoesNotExistStatusCode(e) && e instanceof HttpResponseException) { + HttpResponse response = ((HttpResponseException) e).getResponse(); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), false); + } else { + throw LOGGER.logExceptionAsError(e); + } + } } /** @@ -623,7 +807,93 @@ public SyncPoller beginCopy(String sourceUrl, Map beginCopy(BlobBeginCopyOptions options) { - return client.beginCopy(options).getSyncPoller(); + StorageImplUtils.assertNotNull("options", options); + final AtomicReference copyId = new AtomicReference<>(); + final Duration interval = options.getPollInterval() != null ? options.getPollInterval() : Duration.ofSeconds(1); + final BlobBeginCopySourceRequestConditions sourceModifiedConditions = + options.getSourceRequestConditions() == null + ? new BlobBeginCopySourceRequestConditions() + : options.getSourceRequestConditions(); + final BlobRequestConditions destinationRequestConditions = + options.getDestinationRequestConditions() == null + ? new BlobRequestConditions() + : options.getDestinationRequestConditions(); + final BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null + ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); + + Function, PollResponse> syncActivationOperation = + (pollingContext) -> { + ResponseBase response = + azureBlobStorage.getBlobs().startCopyFromURLWithResponse(containerName, blobName, + options.getSourceUrl(), null, options.getMetadata(), options.getTier(), + options.getRehydratePriority(), sourceModifiedConditions.getIfModifiedSince(), + sourceModifiedConditions.getIfUnmodifiedSince(), sourceModifiedConditions.getIfMatch(), + sourceModifiedConditions.getIfNoneMatch(), sourceModifiedConditions.getTagsConditions(), + destinationRequestConditions.getIfModifiedSince(), + destinationRequestConditions.getIfUnmodifiedSince(), destinationRequestConditions.getIfMatch(), + destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getTagsConditions(), + destinationRequestConditions.getLeaseId(), null, ModelHelper.tagsToString(options.getTags()), + options.isSealDestination(), immutabilityPolicy.getExpiryTime(), + immutabilityPolicy.getPolicyMode(), options.isLegalHold(), Context.NONE); + + BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); + copyId.set(headers.getXMsCopyId()); + + return new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, new BlobCopyInfo( + options.getSourceUrl(), headers.getXMsCopyId(), headers.getXMsCopyStatus(), headers.getETag(), + headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()))); + + }; + + Function, PollResponse> pollOperation = (pollingContext) -> + onPoll(pollingContext.getLatestResponse(), destinationRequestConditions); + + BiFunction, PollResponse, BlobCopyInfo> cancelOperation = + (pollingContext, firstResponse) -> { + if (firstResponse == null || firstResponse.getValue() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Cannot cancel a poll response that never started.")); + } + final String copyIdentifier = firstResponse.getValue().getCopyId(); + if (!CoreUtils.isNullOrEmpty(copyIdentifier)) { + LOGGER.info("Cancelling copy operation for copy id: {}", copyIdentifier); + abortCopyFromUrl(copyIdentifier); + return firstResponse.getValue(); + } + return null; + }; + + Function, Void> fetchResultOperation = (pollingContext) -> null; + return SyncPoller.createPoller(interval, syncActivationOperation, pollOperation, cancelOperation, + fetchResultOperation); + } + + + private PollResponse onPoll(PollResponse pollResponse, + BlobRequestConditions requestConditions) { + if (pollResponse.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED + || pollResponse.getStatus() == LongRunningOperationStatus.FAILED) { + return pollResponse; + } + + final BlobCopyInfo lastInfo = pollResponse.getValue(); + if (lastInfo == null) { + LOGGER.warning("BlobCopyInfo does not exist. Activation operation failed."); + return new PollResponse<>(LongRunningOperationStatus.fromString("COPY_START_FAILED", true), null); + } + + try { + Response response = getPropertiesWithResponse(requestConditions, null, null); + BlobProperties value = response.getValue(); + final CopyStatusType status = value.getCopyStatus(); + final BlobCopyInfo result = new BlobCopyInfo(value.getCopySource(), value.getCopyId(), status, + value.getETag(), value.getCopyCompletionTime(), value.getCopyStatusDescription()); + + LongRunningOperationStatus operationStatus = ModelHelper.mapStatusToLongRunningOperationStatus(status); + return new PollResponse<>(operationStatus, result); + } catch (RuntimeException e) { + return new PollResponse<>(LongRunningOperationStatus.fromString("POLLING_FAILED", true), lastInfo); + } } @@ -674,8 +944,13 @@ public void abortCopyFromUrl(String copyId) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response abortCopyFromUrlWithResponse(String copyId, String leaseId, Duration timeout, - Context context) { - return blockWithOptionalTimeout(client.abortCopyFromUrlWithResponse(copyId, leaseId, context), timeout); + Context context) { + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getBlobs().abortCopyFromURLNoCustomHeadersWithResponse(containerName, blobName, + copyId, null, leaseId, null, finalContext); + + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -788,10 +1063,35 @@ public Response copyFromUrlWithResponse(String copySource, Map copyFromUrlWithResponse(BlobCopyFromUrlOptions options, Duration timeout, Context context) { - Mono> response = client - .copyFromUrlWithResponse(options, context); + StorageImplUtils.assertNotNull("options", options); + RequestConditions sourceModifiedRequestConditions = options.getSourceRequestConditions() == null + ? new RequestConditions() : options.getSourceRequestConditions(); + BlobRequestConditions destRequestConditions = options.getDestinationRequestConditions() == null + ? new BlobRequestConditions() : options.getDestinationRequestConditions(); + BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null + ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); + + try { + new URL(options.getCopySource()); + } catch (MalformedURLException ex) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("'copySource' is not a valid url.", ex)); + } + String sourceAuth = options.getSourceAuthorization() == null + ? null : options.getSourceAuthorization().toString(); + + Callable> operation = () -> + this.azureBlobStorage.getBlobs().copyFromURLWithResponse(containerName, blobName, options.getCopySource(), + null, options.getMetadata(), options.getTier(), sourceModifiedRequestConditions.getIfModifiedSince(), + sourceModifiedRequestConditions.getIfUnmodifiedSince(), sourceModifiedRequestConditions.getIfMatch(), + sourceModifiedRequestConditions.getIfNoneMatch(), destRequestConditions.getIfModifiedSince(), + destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), + destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), + destRequestConditions.getLeaseId(), null, null, ModelHelper.tagsToString(options.getTags()), + immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), + sourceAuth, options.getCopySourceTagsMode(), this.encryptionScope, context); - return blockWithOptionalTimeout(response, timeout); + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsCopyId()); } /** @@ -1312,10 +1612,16 @@ public void delete() { @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client - .deleteWithResponse(deleteBlobSnapshotOptions, requestConditions, context); + Context finalContext = context == null ? Context.NONE : context; + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; + Callable> operation = () -> azureBlobStorage.getBlobs().deleteNoCustomHeadersWithResponse( + containerName, blobName, snapshot, versionId, null, finalRequestConditions.getLeaseId(), + deleteBlobSnapshotOptions, finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, null, + finalContext); - return blockWithOptionalTimeout(response, timeout); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -1375,8 +1681,19 @@ public boolean deleteIfExists() { @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteIfExistsWithResponse(DeleteSnapshotsOptionType deleteBlobSnapshotOptions, BlobRequestConditions requestConditions, Duration timeout, Context context) { - return blockWithOptionalTimeout(client.deleteIfExistsWithResponse(deleteBlobSnapshotOptions, - requestConditions, context), timeout); + try { + Response response = this.deleteWithResponse(deleteBlobSnapshotOptions, requestConditions, timeout, + context); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), true); + } catch (RuntimeException e) { + if (ModelHelper.checkBlobDoesNotExistStatusCode(e) && e instanceof HttpResponseException) { + HttpResponse response = ((HttpResponseException) e).getResponse(); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + false); + } else { + throw LOGGER.logExceptionAsError(e); + } + } } /** @@ -1427,9 +1744,18 @@ public BlobProperties getProperties() { @ServiceMethod(returns = ReturnType.SINGLE) public Response getPropertiesWithResponse(BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client.getPropertiesWithResponse(requestConditions, context); - - return blockWithOptionalTimeout(response, timeout); + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getBlobs().getPropertiesWithResponse(containerName, blobName, snapshot, versionId, + null, finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, + customerProvidedKey, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, BlobPropertiesConstructorProxy + .create(new BlobPropertiesInternalGetProperties(response.getDeserializedHeaders()))); } /** @@ -1487,10 +1813,18 @@ public void setHttpHeaders(BlobHttpHeaders headers) { @ServiceMethod(returns = ReturnType.SINGLE) public Response setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client - .setHttpHeadersWithResponse(headers, requestConditions, context); + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() + : requestConditions; + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getBlobs().setHttpHeadersNoCustomHeadersWithResponse(containerName, blobName, null, + finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, headers, + finalContext); - return blockWithOptionalTimeout(response, timeout); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -1546,9 +1880,18 @@ public void setMetadata(Map metadata) { @ServiceMethod(returns = ReturnType.SINGLE) public Response setMetadataWithResponse(Map metadata, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client.setMetadataWithResponse(metadata, requestConditions, context); + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() + : requestConditions; + Context finalContext = context == null ? Context.NONE : context; - return blockWithOptionalTimeout(response, timeout); + Callable> operation = () -> + this.azureBlobStorage.getBlobs().setMetadataNoCustomHeadersWithResponse(containerName, blobName, null, + metadata, finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, + customerProvidedKey, encryptionScope, finalContext); + + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -1597,9 +1940,21 @@ public Map getTags() { @ServiceMethod(returns = ReturnType.SINGLE) public Response> getTagsWithResponse(BlobGetTagsOptions options, Duration timeout, Context context) { - Mono>> response = client.getTagsWithResponse(options, context); - - return blockWithOptionalTimeout(response, timeout); + BlobGetTagsOptions finalTagOptions = (options == null) ? new BlobGetTagsOptions() : options; + BlobRequestConditions requestConditions = (finalTagOptions.getRequestConditions() == null) + ? new BlobRequestConditions() : finalTagOptions.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getBlobs().getTagsWithResponse(containerName, blobName, null, null, snapshot, + versionId, requestConditions.getTagsConditions(), requestConditions.getLeaseId(), finalContext); + + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + Map tags = new HashMap<>(); + for (BlobTag tag : response.getValue().getBlobTagSet()) { + tags.put(tag.getKey(), tag.getValue()); + } + return new SimpleResponse<>(response, tags); } /** @@ -1650,9 +2005,22 @@ public void setTags(Map tags) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response setTagsWithResponse(BlobSetTagsOptions options, Duration timeout, Context context) { - Mono> response = client.setTagsWithResponse(options, context); - - return blockWithOptionalTimeout(response, timeout); + StorageImplUtils.assertNotNull("options", options); + Context finalContext = context == null ? Context.NONE : context; + BlobRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobRequestConditions() : options.getRequestConditions(); + List tagList = null; + if (options.getTags() != null) { + tagList = new ArrayList<>(); + for (Map.Entry entry : options.getTags().entrySet()) { + tagList.add(new BlobTag().setKey(entry.getKey()).setValue(entry.getValue())); + } + } + BlobTags t = new BlobTags().setBlobTagSet(tagList); + Callable> operation = () -> + this.azureBlobStorage.getBlobs().setTagsNoCustomHeadersWithResponse(containerName, blobName, null, versionId, + null, null, null, requestConditions.getTagsConditions(), requestConditions.getLeaseId(), t, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -1708,11 +2076,18 @@ public BlobClientBase createSnapshot() { @ServiceMethod(returns = ReturnType.SINGLE) public Response createSnapshotWithResponse(Map metadata, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client - .createSnapshotWithResponse(metadata, requestConditions, context) - .map(rb -> new SimpleResponse<>(rb, new BlobClientBase(rb.getValue()))); + Context finalContext = context == null ? Context.NONE : context; + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - return blockWithOptionalTimeout(response, timeout); + Callable> operation = () -> this.azureBlobStorage.getBlobs() + .createSnapshotWithResponse(containerName, blobName, null, metadata, + finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), + finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), + finalRequestConditions.getTagsConditions(), finalRequestConditions.getLeaseId(), null, + customerProvidedKey, encryptionScope, finalContext); + + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + return new SimpleResponse<>(response, this.getSnapshotClient(response.getDeserializedHeaders().getXMsSnapshot())); } /** @@ -1803,7 +2178,13 @@ public Response setAccessTierWithResponse(AccessTier tier, RehydratePriori @ServiceMethod(returns = ReturnType.SINGLE) public Response setAccessTierWithResponse(BlobSetAccessTierOptions options, Duration timeout, Context context) { - return blockWithOptionalTimeout(client.setTierWithResponse(options, context), timeout); + StorageImplUtils.assertNotNull("options", options); + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> this.azureBlobStorage.getBlobs().setTierNoCustomHeadersWithResponse( + containerName, blobName, options.getTier(), snapshot, versionId, null, options.getPriority(), null, + options.getLeaseId(), options.getTagsConditions(), finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -1847,9 +2228,10 @@ public void undelete() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response undeleteWithResponse(Duration timeout, Context context) { - Mono> response = client.undeleteWithResponse(context); - - return blockWithOptionalTimeout(response, timeout); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> this.azureBlobStorage.getBlobs().undeleteNoCustomHeadersWithResponse( + containerName, blobName, null, null, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -1895,9 +2277,14 @@ public StorageAccountInfo getAccountInfo() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAccountInfoWithResponse(Duration timeout, Context context) { - Mono> response = client.getAccountInfoWithResponse(context); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> this.azureBlobStorage.getBlobs() + .getAccountInfoWithResponse(containerName, blobName, finalContext); - return blockWithOptionalTimeout(response, timeout); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + BlobsGetAccountInfoHeaders hd = response.getDeserializedHeaders(); + return new SimpleResponse<>(response, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind())); } /** @@ -1926,7 +2313,8 @@ public Response getAccountInfoWithResponse(Duration timeout, */ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, UserDelegationKey userDelegationKey) { - return this.client.generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey); + return generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey, getAccountName(), + Context.NONE); } /** @@ -1957,8 +2345,8 @@ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServic */ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, UserDelegationKey userDelegationKey, String accountName, Context context) { - return this.client.generateUserDelegationSas(blobServiceSasSignatureValues, userDelegationKey, accountName, - context); + return new BlobSasImplUtil(blobServiceSasSignatureValues, getContainerName(), getBlobName(), getSnapshotId(), + getVersionId(), getEncryptionScope()).generateUserDelegationSas(userDelegationKey, accountName, context); } /** @@ -1985,7 +2373,7 @@ public String generateUserDelegationSas(BlobServiceSasSignatureValues blobServic * @return A {@code String} representing the SAS query parameters. */ public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues) { - return this.client.generateSas(blobServiceSasSignatureValues); + return generateSas(blobServiceSasSignatureValues, Context.NONE); } /** @@ -2014,7 +2402,8 @@ public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureV * @return A {@code String} representing the SAS query parameters. */ public String generateSas(BlobServiceSasSignatureValues blobServiceSasSignatureValues, Context context) { - return this.client.generateSas(blobServiceSasSignatureValues, context); + return new BlobSasImplUtil(blobServiceSasSignatureValues, getContainerName(), getBlobName(), getSnapshotId(), + getVersionId(), getEncryptionScope()).generateSas(SasImplUtils.extractSharedKeyCredential(getHttpPipeline()), context); } /** @@ -2083,16 +2472,40 @@ public InputStream openQueryInputStream(String expression) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response openQueryInputStreamWithResponse(BlobQueryOptions queryOptions) { - - // Data to subscribe to and read from. - BlobQueryAsyncResponse response = client.queryWithResponse(queryOptions).block(); - - // Create input stream from the data. - if (response == null) { - throw LOGGER.logExceptionAsError(new IllegalStateException("Query response cannot be null")); + StorageImplUtils.assertNotNull("options", queryOptions); + StorageImplUtils.assertNotNull("outputStream", queryOptions.getOutputStream()); + BlobRequestConditions requestConditions = queryOptions.getRequestConditions() == null + ? new BlobRequestConditions() : queryOptions.getRequestConditions(); + QuerySerialization in = BlobQueryReader.transformInputSerialization(queryOptions.getInputSerialization(), + LOGGER); + QuerySerialization out = BlobQueryReader.transformOutputSerialization(queryOptions.getOutputSerialization(), + LOGGER); + + QueryRequest qr = new QueryRequest() + .setExpression(queryOptions.getExpression()) + .setInputSerialization(in) + .setOutputSerialization(out); + + try { + ResponseBase response = this.azureBlobStorage.getBlobs().queryWithResponse( + containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, qr, getCustomerProvidedKey(), Context.NONE); + + InputStream inputStream = response.getValue(); + OutputStream outputStream = queryOptions.getOutputStream(); + + byte[] buffer = new byte[4096]; + int bytesRead; + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + + return new SimpleResponse<>(response, inputStream); + } catch (IOException e) { + throw new UncheckedIOException("Failed to read query results or write to the output stream", e); } - return new ResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), - new FluxInputStream(response.getValue()), response.getDeserializedHeaders()); } /** @@ -2169,12 +2582,47 @@ public void query(OutputStream stream, String expression) { public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Duration timeout, Context context) { StorageImplUtils.assertNotNull("options", queryOptions); StorageImplUtils.assertNotNull("outputStream", queryOptions.getOutputStream()); - Mono download = client - .queryWithResponse(queryOptions, context) - .flatMap(response -> FluxUtil.writeToOutputStream(response.getValue(), queryOptions.getOutputStream()) - .thenReturn(new BlobQueryResponse(response))); - - return blockWithOptionalTimeout(download, timeout); + Context finalContext = context == null ? Context.NONE : context; + BlobRequestConditions requestConditions = queryOptions.getRequestConditions() == null + ? new BlobRequestConditions() : queryOptions.getRequestConditions(); + QuerySerialization in = BlobQueryReader.transformInputSerialization(queryOptions.getInputSerialization(), + LOGGER); + QuerySerialization out = BlobQueryReader.transformOutputSerialization(queryOptions.getOutputSerialization(), + LOGGER); + + QueryRequest qr = new QueryRequest() + .setExpression(queryOptions.getExpression()) + .setInputSerialization(in) + .setOutputSerialization(out); + + Callable> operation = () -> + this.azureBlobStorage.getBlobs().queryWithResponse(containerName, blobName, getSnapshotId(), null, + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, qr, + getCustomerProvidedKey(), finalContext); + try { + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + InputStream inputStream = response.getValue(); + OutputStream outputStream = queryOptions.getOutputStream(); + + byte[] buffer = new byte[4096]; + int bytesRead; + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + + BlobQueryAsyncResponse asyncResponse = new BlobQueryAsyncResponse(response.getRequest(), + response.getStatusCode(), response.getHeaders(), + /* Parse the avro reactive stream. */ + new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()).read(), + ModelHelper.transformQueryHeaders(response.getDeserializedHeaders(), response.getHeaders())); + + return new BlobQueryResponse(asyncResponse); + } catch (IOException e) { + throw new UncheckedIOException("Failed to read query results or write to the output stream", e); + } } /** @@ -2231,10 +2679,36 @@ public BlobImmutabilityPolicy setImmutabilityPolicy(BlobImmutabilityPolicy immut @ServiceMethod(returns = ReturnType.SINGLE) public Response setImmutabilityPolicyWithResponse(BlobImmutabilityPolicy immutabilityPolicy, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = client.setImmutabilityPolicyWithResponse(immutabilityPolicy, - requestConditions, context); + Context finalContext = context == null ? Context.NONE : context; + BlobImmutabilityPolicy finalImmutabilityPolicy = immutabilityPolicy == null ? new BlobImmutabilityPolicy() + : immutabilityPolicy; + if (BlobImmutabilityPolicyMode.MUTABLE.equals(finalImmutabilityPolicy.getPolicyMode())) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("immutabilityPolicy.policyMode must be %s or %s", + BlobImmutabilityPolicyMode.LOCKED.toString(), BlobImmutabilityPolicyMode.UNLOCKED.toString()))); + } - return blockWithOptionalTimeout(response, timeout); + BlobRequestConditions finalRequestConditions = requestConditions == null + ? new BlobRequestConditions() : requestConditions; + + ModelHelper.validateConditionsNotPresent(finalRequestConditions, + EnumSet.of(BlobRequestConditionProperty.LEASE_ID, BlobRequestConditionProperty.TAGS_CONDITIONS, + BlobRequestConditionProperty.IF_MATCH, BlobRequestConditionProperty.IF_NONE_MATCH, + BlobRequestConditionProperty.IF_MODIFIED_SINCE), "setImmutabilityPolicy(WithResponse)", + "requestConditions"); + + Callable> operation = () -> + this.azureBlobStorage.getBlobs().setImmutabilityPolicyWithResponse(containerName, blobName, null, null, + finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getExpiryTime(), + finalImmutabilityPolicy.getPolicyMode(), finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + + BlobsSetImmutabilityPolicyHeaders headers = response.getDeserializedHeaders(); + BlobImmutabilityPolicy responsePolicy = new BlobImmutabilityPolicy() + .setPolicyMode(headers.getXMsImmutabilityPolicyMode()) + .setExpiryTime(headers.getXMsImmutabilityPolicyUntilDate()); + return new SimpleResponse<>(response, responsePolicy); } /** @@ -2277,9 +2751,10 @@ public void deleteImmutabilityPolicy() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteImmutabilityPolicyWithResponse(Duration timeout, Context context) { - Mono> response = client.deleteImmutabilityPolicyWithResponse(context); - - return blockWithOptionalTimeout(response, timeout); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> this.azureBlobStorage.getBlobs() + .deleteImmutabilityPolicyNoCustomHeadersWithResponse(containerName, blobName, null, null, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -2324,8 +2799,14 @@ public BlobLegalHoldResult setLegalHold(boolean legalHold) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response setLegalHoldWithResponse(boolean legalHold, Duration timeout, Context context) { - Mono> response = client.setLegalHoldWithResponse(legalHold, context); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getBlobs().setLegalHoldWithResponse(containerName, blobName, legalHold, null, null, + finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, + new InternalBlobLegalHoldResult(response.getDeserializedHeaders().isXMsLegalHold())); - return blockWithOptionalTimeout(response, timeout); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java index 855fc1e82e021..78cb6b43c56d1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java @@ -6,21 +6,41 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobContainerClient; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersAcquireLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersBreakLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersChangeLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders; import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.models.BlobLeaseRequestConditions; +import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.options.BlobAcquireLeaseOptions; import com.azure.storage.blob.options.BlobBreakLeaseOptions; import com.azure.storage.blob.options.BlobChangeLeaseOptions; import com.azure.storage.blob.options.BlobReleaseLeaseOptions; import com.azure.storage.blob.options.BlobRenewLeaseOptions; import com.azure.storage.common.implementation.StorageImplUtils; +import reactor.core.publisher.Mono; import java.net.URL; import java.time.Duration; +import java.util.concurrent.Callable; + +import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** * This class provides a client that contains all the leasing operations for {@link BlobContainerClient containers} and @@ -54,10 +74,26 @@ */ @ServiceClient(builder = BlobLeaseClientBuilder.class) public final class BlobLeaseClient { - private final BlobLeaseAsyncClient client; + private final String containerName; + private final String blobName; + private final boolean isBlob; + private final AzureBlobStorageImpl client; + private final String accountName; + + private volatile String leaseId; - BlobLeaseClient(BlobLeaseAsyncClient client) { - this.client = client; + BlobLeaseClient(HttpPipeline pipeline, String url, String containerName, String blobName, String leaseId, + boolean isBlob, String accountName, String serviceVersion) { + this.isBlob = isBlob; + this.leaseId = leaseId; + this.client = new AzureBlobStorageImplBuilder() + .pipeline(pipeline) + .url(url) + .version(serviceVersion) + .buildClient(); + this.accountName = accountName; + this.containerName = containerName; + this.blobName = blobName; } /** @@ -68,7 +104,11 @@ public final class BlobLeaseClient { * @return URL of the lease client. */ public String getResourceUrl() { - return client.getResourceUrl(); + if (this.isBlob) { + return this.client.getUrl() + "/" + containerName + "/" + blobName; + } else { + return this.client.getUrl() + "/" + containerName; + } } /** @@ -77,7 +117,7 @@ public String getResourceUrl() { * @return the lease ID. */ public String getLeaseId() { - return client.getLeaseId(); + return leaseId; } /** @@ -161,8 +201,29 @@ public Response acquireLeaseWithResponse(int durationInSeconds, RequestC @ServiceMethod(returns = ReturnType.SINGLE) public Response acquireLeaseWithResponse(BlobAcquireLeaseOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client.acquireLeaseWithResponse(options, context), - timeout); + StorageImplUtils.assertNotNull("options", options); + BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : options.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + + if (this.isBlob) { + Callable> operation = () -> + this.client.getBlobs().acquireLeaseWithResponse(containerName, blobName, null, options.getDuration(), + this.leaseId, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + } else { + Callable> operation = () -> + this.client.getContainers().acquireLeaseWithResponse(containerName, null, options.getDuration(), + this.leaseId, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + null, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + } } /** @@ -241,7 +302,25 @@ public Response renewLeaseWithResponse(RequestConditions modifiedRequest @ServiceMethod(returns = ReturnType.SINGLE) public Response renewLeaseWithResponse(BlobRenewLeaseOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client.renewLeaseWithResponse(options, context), timeout); + BlobRenewLeaseOptions finalOptions = (options == null) ? new BlobRenewLeaseOptions() : options; + BlobLeaseRequestConditions requestConditions = (finalOptions.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : finalOptions.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + if (this.isBlob) { + Callable> operation = () -> + this.client.getBlobs().renewLeaseWithResponse(containerName, blobName, this.leaseId, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, finalContext); + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + } else { + Callable> operation = () -> + this.client.getContainers().renewLeaseWithResponse(containerName, this.leaseId, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, finalContext); + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + } } /** @@ -319,8 +398,23 @@ public Response releaseLeaseWithResponse(RequestConditions modifiedRequest @ServiceMethod(returns = ReturnType.SINGLE) public Response releaseLeaseWithResponse(BlobReleaseLeaseOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client.releaseLeaseWithResponse(options, context), - timeout); + BlobReleaseLeaseOptions finalOptions = (options == null) ? new BlobReleaseLeaseOptions() : options; + BlobLeaseRequestConditions requestConditions = (finalOptions.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : finalOptions.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + if (this.isBlob) { + Callable> operation = () -> + this.client.getBlobs().releaseLeaseNoCustomHeadersWithResponse(containerName, blobName, this.leaseId, + null, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); + } else { + Callable> operation = () -> + this.client.getContainers().releaseLeaseNoCustomHeadersWithResponse(containerName, this.leaseId, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, finalContext); + return sendRequest(operation, timeout, BlobStorageException.class); + } } /** @@ -412,7 +506,29 @@ public Response breakLeaseWithResponse(Integer breakPeriodInSeconds, */ @ServiceMethod(returns = ReturnType.SINGLE) public Response breakLeaseWithResponse(BlobBreakLeaseOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client.breakLeaseWithResponse(options, context), timeout); + BlobBreakLeaseOptions finalOptions = (options == null) ? new BlobBreakLeaseOptions() : options; + BlobLeaseRequestConditions requestConditions = (finalOptions.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : finalOptions.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + Integer breakPeriod = finalOptions.getBreakPeriod() == null ? null + : Math.toIntExact(finalOptions.getBreakPeriod().getSeconds()); + + if (this.isBlob) { + Callable> operation = () -> + this.client.getBlobs().breakLeaseWithResponse(containerName, blobName, null, breakPeriod, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, finalContext); + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseTime()); + } else { + Callable> operation = () -> + this.client.getContainers().breakLeaseWithResponse(containerName, null, breakPeriod, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, + finalContext); + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseTime()); + } } /** @@ -492,8 +608,29 @@ public Response changeLeaseWithResponse(String proposedId, */ @ServiceMethod(returns = ReturnType.SINGLE) public Response changeLeaseWithResponse(BlobChangeLeaseOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(this.client.changeLeaseWithResponse(options, context), - timeout); + StorageImplUtils.assertNotNull("options", options); + BlobLeaseRequestConditions requestConditions = (options.getRequestConditions() == null) + ? new BlobLeaseRequestConditions() : options.getRequestConditions(); + Context finalContext = context == null ? Context.NONE : context; + + if (this.isBlob) { + Callable> operation = () -> + this.client.getBlobs().changeLeaseWithResponse(containerName, blobName, this.leaseId, + options.getProposedId(), null, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + } else { + Callable> operation = () -> + this.client.getContainers().changeLeaseWithResponse(containerName, this.leaseId, options.getProposedId(), + null, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, + finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + } } /** @@ -502,7 +639,7 @@ public Response changeLeaseWithResponse(BlobChangeLeaseOptions options, * @return account name associated with this storage resource. */ public String getAccountName() { - return client.getAccountName(); + return this.accountName; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java index 8d232a3d0d6ee..cc817f8d08b5f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java @@ -86,7 +86,9 @@ public final class BlobLeaseClientBuilder { * @return a {@link BlobLeaseClient} based on the configurations in this builder. */ public BlobLeaseClient buildClient() { - return new BlobLeaseClient(buildAsyncClient()); + BlobServiceVersion version = (serviceVersion == null) ? BlobServiceVersion.getLatest() : serviceVersion; + return new BlobLeaseClient(pipeline, url, containerName, blobName, getLeaseId(), isBlob, accountName, + version.getVersion()); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java index cde4a3378032d..e5509491cc0c5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobAsyncClient.java @@ -19,6 +19,7 @@ import com.azure.storage.blob.implementation.models.BlockBlobsPutBlobFromUrlHeaders; import com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobImmutabilityPolicy; @@ -434,7 +435,7 @@ Mono> uploadWithResponse(BlockBlobSimpleUploadOptions op requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), + ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.isLegalHold(), null, options.getHeaders(), getCustomerProvidedKey(), encryptionScope, finalContext) .map(rb -> { @@ -586,7 +587,7 @@ Mono> uploadFromUrlWithResponse(BlobUploadFromUrlOptions sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), sourceRequestConditions.getTagsConditions(), - null, options.getContentMd5(), tagsToString(options.getTags()), + null, options.getContentMd5(), ModelHelper.tagsToString(options.getTags()), options.isCopySourceBlobProperties(), sourceAuth, options.getCopySourceTagsMode(), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context) @@ -1151,7 +1152,7 @@ Mono> commitBlockListWithResponse(BlockBlobCommitBlockLi requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), + ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.isLegalHold(), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context) .map(rb -> { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index 7b3bfbadcccb0..d802da4b9904e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.exception.UnexpectedLengthException; +import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; import com.azure.core.util.Context; @@ -14,6 +15,8 @@ import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobClientBuilder; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobRange; @@ -72,25 +75,25 @@ public final class BlockBlobClient extends BlobClientBase { * @deprecated Use {@link #MAX_STAGE_BLOCK_BYTES_LONG}. */ @Deprecated - public static final int MAX_UPLOAD_BLOB_BYTES = BlockBlobAsyncClient.MAX_UPLOAD_BLOB_BYTES; + public static final int MAX_UPLOAD_BLOB_BYTES = 256 * Constants.MB; /** * Indicates the maximum number of bytes that can be sent in a call to upload. */ - public static final long MAX_UPLOAD_BLOB_BYTES_LONG = BlockBlobAsyncClient.MAX_UPLOAD_BLOB_BYTES_LONG; + public static final long MAX_UPLOAD_BLOB_BYTES_LONG = 5000L * Constants.MB; /** * Indicates the maximum number of bytes that can be sent in a call to stageBlock. * @deprecated Use {@link #MAX_STAGE_BLOCK_BYTES_LONG} */ @Deprecated - public static final int MAX_STAGE_BLOCK_BYTES = BlockBlobAsyncClient.MAX_STAGE_BLOCK_BYTES; + public static final int MAX_STAGE_BLOCK_BYTES = 100 * Constants.MB; /** * Indicates the maximum number of bytes that can be sent in a call to stageBlock. */ - public static final long MAX_STAGE_BLOCK_BYTES_LONG = BlockBlobAsyncClient.MAX_STAGE_BLOCK_BYTES_LONG; + public static final long MAX_STAGE_BLOCK_BYTES_LONG = 4000L * Constants.MB; /** * Indicates the maximum number of blocks allowed in a block blob. */ - public static final int MAX_BLOCKS = BlockBlobAsyncClient.MAX_BLOCKS; + public static final int MAX_BLOCKS = 50000; /** * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. @@ -98,7 +101,32 @@ public final class BlockBlobClient extends BlobClientBase { * @param client the async block blob client */ BlockBlobClient(BlockBlobAsyncClient client) { - super(client); + this(client, client.getHttpPipeline(), client.getAccountUrl(), client.getServiceVersion(), client.getAccountName(), + client.getContainerName(), client.getBlobName(), client.getSnapshotId(), client.getCustomerProvidedKey(), + new EncryptionScope().setEncryptionScope(client.getEncryptionScope()), client.getVersionId()); + } + + /** + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param versionId The version identifier for the blob, pass {@code null} to interact with the latest blob version. + */ + BlockBlobClient(BlockBlobAsyncClient client, HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, + String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey, + EncryptionScope encryptionScope, String versionId) { + super(client, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, + customerProvidedKey, encryptionScope, versionId); this.client = client; } @@ -110,7 +138,14 @@ public final class BlockBlobClient extends BlobClientBase { */ @Override public BlockBlobClient getEncryptionScopeClient(String encryptionScope) { - return new BlockBlobClient(client.getEncryptionScopeAsyncClient(encryptionScope)); + EncryptionScope finalEncryptionScope = null; + if (encryptionScope != null) { + finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); + } + BlockBlobAsyncClient asyncClient = client.getEncryptionScopeAsyncClient(encryptionScope); + return new BlockBlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), finalEncryptionScope, + getVersionId()); } /** @@ -122,7 +157,18 @@ public BlockBlobClient getEncryptionScopeClient(String encryptionScope) { */ @Override public BlockBlobClient getCustomerProvidedKeyClient(CustomerProvidedKey customerProvidedKey) { - return new BlockBlobClient(client.getCustomerProvidedKeyAsyncClient(customerProvidedKey)); + CpkInfo finalCustomerProvidedKey = null; + if (customerProvidedKey != null) { + finalCustomerProvidedKey = new CpkInfo() + .setEncryptionKey(customerProvidedKey.getKey()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) + .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); + } + BlockBlobAsyncClient asyncClient = client.getCustomerProvidedKeyAsyncClient(customerProvidedKey); + + return new BlockBlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), finalCustomerProvidedKey, + encryptionScope, getVersionId()); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java index e195179ce4384..6e8f0a59de677 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobAsyncClient.java @@ -162,23 +162,6 @@ public PageBlobAsyncClient getCustomerProvidedKeyAsyncClient(CustomerProvidedKey getVersionId()); } - private static String pageRangeToString(PageRange pageRange) { - if (pageRange.getStart() < 0 || pageRange.getEnd() <= 0) { - throw new IllegalArgumentException("PageRange's start and end values must be greater than or equal to " - + "0 if specified."); - } - if (pageRange.getStart() % PAGE_BYTES != 0) { - throw new IllegalArgumentException("PageRange's start value must be a multiple of 512."); - } - if (pageRange.getEnd() % PAGE_BYTES != PAGE_BYTES - 1) { - throw new IllegalArgumentException("PageRange's end value must be 1 less than a multiple of 512."); - } - if (pageRange.getEnd() <= pageRange.getStart()) { - throw new IllegalArgumentException("PageRange's End value must be after the start."); - } - return "bytes=" + pageRange.getStart() + '-' + pageRange.getEnd(); - } - /** * Creates a page blob of the specified length. By default, this method will not overwrite an existing blob. * Call PutPage to upload data to a page blob. For more information, see the @@ -339,7 +322,7 @@ Mono> createWithResponse(PageBlobCreateOptions options, C options.getSize(), null, null, options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), - options.getSequenceNumber(), null, tagsToString(options.getTags()), + options.getSequenceNumber(), null, ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.isLegalHold(), options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context) @@ -530,7 +513,7 @@ Mono> uploadPagesWithResponse(PageRange pageRange, Flux> uploadPagesFromUrlWithResponse(PageBlobUploadPagesF throw LOGGER.logExceptionAsError(new IllegalArgumentException("range cannot be null.")); } - String rangeString = pageRangeToString(options.getRange()); + String rangeString = ModelHelper.pageRangeToString(options.getRange()); long sourceOffset = options.getSourceOffset() == null ? 0L : options.getSourceOffset(); - String sourceRangeString = pageRangeToString(new PageRange() + String sourceRangeString = ModelHelper.pageRangeToString(new PageRange() .setStart(sourceOffset) .setEnd(sourceOffset + (options.getRange().getEnd() - options.getRange().getStart()))); @@ -805,7 +788,7 @@ Mono> clearPagesWithResponse(PageRange pageRange, // subscription. throw LOGGER.logExceptionAsError(new IllegalArgumentException("pageRange cannot be null.")); } - String pageRangeStr = pageRangeToString(pageRange); + String pageRangeStr = ModelHelper.pageRangeToString(pageRange); context = context == null ? Context.NONE : context; return this.azureBlobStorage.getPageBlobs().clearPagesWithResponseAsync(containerName, blobName, 0, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index f9b041e44ecba..1081835233abe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -7,19 +7,43 @@ import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; import com.azure.core.exception.UnexpectedLengthException; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpRange; +import com.azure.core.http.HttpResponse; import com.azure.core.http.RequestConditions; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; +import com.azure.core.util.UrlBuilder; +import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsUpdateSequenceNumberHeaders; +import com.azure.storage.blob.implementation.models.PageListHelper; import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobHttpHeaders; +import com.azure.storage.blob.models.BlobImmutabilityPolicy; import com.azure.storage.blob.models.BlobRange; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobStorageException; +import com.azure.storage.blob.models.ClearRange; import com.azure.storage.blob.models.CopyStatusType; +import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey; +import com.azure.storage.blob.models.PageBlobCopyIncrementalRequestConditions; import com.azure.storage.blob.models.PageBlobItem; import com.azure.storage.blob.models.PageBlobRequestConditions; import com.azure.storage.blob.models.PageList; @@ -38,11 +62,20 @@ import reactor.core.publisher.Mono; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; import java.time.Duration; +import java.util.Collections; +import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.concurrent.Callable; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** * Client to a page blob. It may only be instantiated through a {@link SpecializedBlobClientBuilder} or via the method @@ -55,17 +88,18 @@ */ @ServiceClient(builder = SpecializedBlobClientBuilder.class) public final class PageBlobClient extends BlobClientBase { + private static final ClientLogger LOGGER = new ClientLogger(PageBlobClient.class); private final PageBlobAsyncClient pageBlobAsyncClient; /** * Indicates the number of bytes in a page. */ - public static final int PAGE_BYTES = PageBlobAsyncClient.PAGE_BYTES; + public static final int PAGE_BYTES = 512; /** * Indicates the maximum number of bytes that may be sent in a call to putPage. */ - public static final int MAX_PUT_PAGES_BYTES = PageBlobAsyncClient.MAX_PUT_PAGES_BYTES; + public static final int MAX_PUT_PAGES_BYTES = 4 * Constants.MB; /** * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. @@ -73,7 +107,35 @@ public final class PageBlobClient extends BlobClientBase { * @param pageBlobAsyncClient the async page blob client */ PageBlobClient(PageBlobAsyncClient pageBlobAsyncClient) { - super(pageBlobAsyncClient); + this(pageBlobAsyncClient, pageBlobAsyncClient.getHttpPipeline(), pageBlobAsyncClient.getAccountUrl(), + pageBlobAsyncClient.getServiceVersion(), pageBlobAsyncClient.getAccountName(), + pageBlobAsyncClient.getContainerName(), pageBlobAsyncClient.getBlobName(), + pageBlobAsyncClient.getSnapshotId(), pageBlobAsyncClient.getCustomerProvidedKey(), + new EncryptionScope().setEncryptionScope(pageBlobAsyncClient.getEncryptionScope()), + pageBlobAsyncClient.getVersionId()); + } + + /** + * Package-private constructor for use by {@link SpecializedBlobClientBuilder}. + * + * @param pipeline The pipeline used to send and receive service requests. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @param accountName The storage account name. + * @param containerName The container name. + * @param blobName The blob name. + * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. + * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass + * {@code null} to allow the service to use its own encryption. + * @param versionId The version identifier for the blob, pass {@code null} to interact with the latest blob version. + */ + PageBlobClient(PageBlobAsyncClient pageBlobAsyncClient, HttpPipeline pipeline, String url, + BlobServiceVersion serviceVersion, String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey, + EncryptionScope encryptionScope, String versionId) { + super(pageBlobAsyncClient, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, + encryptionScope, versionId); this.pageBlobAsyncClient = pageBlobAsyncClient; } @@ -85,7 +147,14 @@ public final class PageBlobClient extends BlobClientBase { */ @Override public PageBlobClient getEncryptionScopeClient(String encryptionScope) { - return new PageBlobClient(pageBlobAsyncClient.getEncryptionScopeAsyncClient(encryptionScope)); + EncryptionScope finalEncryptionScope = null; + if (encryptionScope != null) { + finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); + } + PageBlobAsyncClient asyncClient = pageBlobAsyncClient.getEncryptionScopeAsyncClient(encryptionScope); + return new PageBlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), finalEncryptionScope, + getVersionId()); } /** @@ -97,7 +166,17 @@ public PageBlobClient getEncryptionScopeClient(String encryptionScope) { */ @Override public PageBlobClient getCustomerProvidedKeyClient(CustomerProvidedKey customerProvidedKey) { - return new PageBlobClient(pageBlobAsyncClient.getCustomerProvidedKeyAsyncClient(customerProvidedKey)); + CpkInfo finalCustomerProvidedKey = null; + if (customerProvidedKey != null) { + finalCustomerProvidedKey = new CpkInfo() + .setEncryptionKey(customerProvidedKey.getKey()) + .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) + .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); + } + PageBlobAsyncClient asyncClient = pageBlobAsyncClient.getCustomerProvidedKeyAsyncClient(customerProvidedKey); + return new PageBlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + getContainerName(), getBlobName(), getSnapshotId(), finalCustomerProvidedKey, encryptionScope, + getVersionId()); } /** @@ -262,8 +341,44 @@ public Response createWithResponse(long size, Long sequenceNumber, */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(PageBlobCreateOptions options, Duration timeout, Context context) { - Mono> response = pageBlobAsyncClient.createWithResponse(options, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); +// Mono> response = pageBlobAsyncClient.createWithResponse(options, context); +// return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + StorageImplUtils.assertNotNull("options", options); + Context finalContext = context == null ? Context.NONE : context; + BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions() + : options.getRequestConditions(); + + if (options.getSize() % PAGE_BYTES != 0) { + // Throwing is preferred to Single.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("size must be a multiple of PageBlobAsyncClient.PAGE_BYTES.")); + } + if (options.getSequenceNumber() != null && options.getSequenceNumber() < 0) { + // Throwing is preferred to Single.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("SequenceNumber must be greater than or equal to 0.")); + } + BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null + ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); + + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().createWithResponse(containerName, blobName, 0, options.getSize(), null, + null, options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), options.getSequenceNumber(), + null, ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), + immutabilityPolicy.getPolicyMode(), options.isLegalHold(), options.getHeaders(), + getCustomerProvidedKey(), encryptionScope, finalContext); + + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + PageBlobsCreateHeaders hd = response.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), hd.getXMsEncryptionScope(), + null, hd.getXMsVersionId()); + return new SimpleResponse<>(response, item); } /** @@ -324,8 +439,22 @@ public PageBlobItem createIfNotExists(long size) { @ServiceMethod(returns = ReturnType.SINGLE) public Response createIfNotExistsWithResponse(PageBlobCreateOptions options, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient. - createIfNotExistsWithResponse(options, context), timeout); + StorageImplUtils.assertNotNull("options", options); + options.setRequestConditions(new BlobRequestConditions().setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD) + .setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD)); + try { + return createWithResponse(options, timeout, context); + } catch (BlobStorageException e) { + if (e.getStatusCode() == 409 && (e.getErrorCode().equals(BlobErrorCode.BLOB_ALREADY_EXISTS) + || e.getErrorCode().equals(BlobErrorCode.RESOURCE_ALREADY_EXISTS))) { + HttpResponse res = e.getResponse(); + return new SimpleResponse<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), null); + } else { + throw LOGGER.logExceptionAsError(e); + } + } catch (RuntimeException e) { + throw LOGGER.logExceptionAsError(e); + } } /** @@ -615,10 +744,32 @@ public PageBlobItem clearPages(PageRange pageRange) { @ServiceMethod(returns = ReturnType.SINGLE) public Response clearPagesWithResponse(PageRange pageRange, PageBlobRequestConditions pageBlobRequestConditions, Duration timeout, Context context) { - Mono> response = pageBlobAsyncClient.clearPagesWithResponse(pageRange, - pageBlobRequestConditions, context); - - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + PageBlobRequestConditions finalPageBlobRequestConditions = pageBlobRequestConditions == null + ? new PageBlobRequestConditions() : pageBlobRequestConditions; + if (pageRange == null) { + // Throwing is preferred to Single.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError(new IllegalArgumentException("pageRange cannot be null.")); + } + String pageRangeStr = ModelHelper.pageRangeToString(pageRange); + Context finalContext = context == null ? Context.NONE : context; + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().clearPagesWithResponse(containerName, blobName, 0, null, pageRangeStr, + pageBlobRequestConditions.getLeaseId(), + pageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), + pageBlobRequestConditions.getIfSequenceNumberLessThan(), + pageBlobRequestConditions.getIfSequenceNumberEqualTo(), + pageBlobRequestConditions.getIfModifiedSince(), + pageBlobRequestConditions.getIfUnmodifiedSince(), pageBlobRequestConditions.getIfMatch(), + pageBlobRequestConditions.getIfNoneMatch(), pageBlobRequestConditions.getTagsConditions(), null, + getCustomerProvidedKey(), encryptionScope, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + PageBlobsClearPagesHeaders hd = response.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), null, + hd.getXMsBlobSequenceNumber()); + return new SimpleResponse<>(response, item); } /** @@ -682,8 +833,21 @@ public PageList getPageRanges(BlobRange blobRange) { @Deprecated public Response getPageRangesWithResponse(BlobRange blobRange, BlobRequestConditions requestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient - .getPageRangesWithResponse(blobRange, requestConditions, context), timeout); + BlobRange finalBlobRange = blobRange == null ? new BlobRange(0) : blobRange; + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().getPageRangesWithResponse(containerName, blobName, + getSnapshotId(), null, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), + finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), + finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), + finalRequestConditions.getTagsConditions(), null, null, null, + finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + response.getValue()); } /** @@ -747,13 +911,53 @@ public PagedIterable listPageRanges(BlobRange blobRange) { @ServiceMethod(returns = ReturnType.SINGLE) public PagedIterable listPageRanges(ListPageRangesOptions options, Duration timeout, Context context) { - return new PagedIterable<>( - // pull timeout out of options - new PagedFlux<>( - pageSize -> pageBlobAsyncClient.listPageRangesWithOptionalTimeout( - options, timeout, context).apply(null, pageSize), - (continuationToken, pageSize) -> pageBlobAsyncClient.listPageRangesWithOptionalTimeout( - options, timeout, context).apply(continuationToken, pageSize))); + Objects.requireNonNull(options, "options must not be null"); + Context finalContext = context == null ? Context.NONE : context; + + // Helper function to retrieve a page of items + Function> pageRetriever = continuationToken -> { + BlobRequestConditions requestConditions = options.getRequestConditions() == null + ? new BlobRequestConditions() : options.getRequestConditions(); + Integer pageSize = options.getMaxResultsPerPage(); + + // Call the synchronous service method + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().getPageRangesWithResponse(containerName, blobName, getSnapshotId(), + null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, continuationToken, pageSize, finalContext); + + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + List value = parsePageRangeItems(response.getValue()); + + return new PagedResponseBase<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + value, + PageListHelper.getNextMarker(response.getValue()), + response.getDeserializedHeaders()); + }; + + return new PagedIterable<>(() -> pageRetriever.apply(null), pageRetriever); + } + + private List parsePageRangeItems(PageList pageList) { + if (pageList == null) return Collections.emptyList(); + return Stream.concat( + pageList.getPageRange().stream().map(this::toPageBlobRange), + pageList.getClearRange().stream().map(this::toPageBlobRange) + ).collect(Collectors.toList()); + } + + private PageRangeItem toPageBlobRange(PageRange range) { + return new PageRangeItem(new HttpRange(range.getStart(), range.getEnd() - range.getStart() + 1), false); + } + + private PageRangeItem toPageBlobRange(ClearRange range) { + return new PageRangeItem(new HttpRange(range.getStart(), range.getEnd() - range.getStart() + 1), true); } /** @@ -828,9 +1032,24 @@ public PageList getPageRangesDiff(BlobRange blobRange, String prevSnapshot) { @Deprecated public Response getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, BlobRequestConditions requestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient - .getPageRangesDiffWithResponse(blobRange, prevSnapshot, null, requestConditions, context), - timeout); + BlobRange finalBlobRange = blobRange == null ? new BlobRange(0) : blobRange; + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; + + if (prevSnapshot == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("prevSnapshot cannot be null")); + } + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse(containerName, blobName, getSnapshotId(), + null, prevSnapshot, null, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), + finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), + finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), + finalRequestConditions.getTagsConditions(), null, null, null, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + response.getValue()); } /** @@ -901,13 +1120,39 @@ public PagedIterable listPageRangesDiff(BlobRange blobRange, Stri @ServiceMethod(returns = ReturnType.SINGLE) public PagedIterable listPageRangesDiff(ListPageRangesDiffOptions options, Duration timeout, Context context) { - return new PagedIterable<>( - // pull timeout out of options - new PagedFlux<>( - pageSize -> pageBlobAsyncClient.listPageRangesDiffWithOptionalTimeout( - options, timeout, context).apply(null, pageSize), - (continuationToken, pageSize) -> pageBlobAsyncClient.listPageRangesDiffWithOptionalTimeout( - options, timeout, context).apply(continuationToken, pageSize))); + Objects.requireNonNull(options, "options must not be null"); + Context finalContext = context == null ? Context.NONE : context; + + // Helper function to retrieve a page of items + Function> pageRetriever = continuationToken -> { + BlobRequestConditions requestConditions = options.getRequestConditions() == null + ? new BlobRequestConditions() : options.getRequestConditions(); + Integer pageSize = options.getMaxResultsPerPage(); + + // Call the synchronous service method + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs() + .getPageRangesDiffWithResponse(containerName, blobName, getSnapshotId(), null, + options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), + null, continuationToken, pageSize, finalContext); + + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + + List value = parsePageRangeItems(response.getValue()); + + return new PagedResponseBase<>( + response.getRequest(), + response.getStatusCode(), + response.getHeaders(), + value, + PageListHelper.getNextMarker(response.getValue()), + response.getDeserializedHeaders()); + }; + + return new PagedIterable<>(() -> pageRetriever.apply(null), pageRetriever); } /** @@ -982,9 +1227,29 @@ public PageList getManagedDiskPageRangesDiff(BlobRange blobRange, String prevSna @ServiceMethod(returns = ReturnType.SINGLE) public Response getManagedDiskPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshotUrl, BlobRequestConditions requestConditions, Duration timeout, Context context) { - return StorageImplUtils.blockWithOptionalTimeout(pageBlobAsyncClient - .getPageRangesDiffWithResponse(blobRange, null, prevSnapshotUrl, requestConditions, context), - timeout); + BlobRange finalBlobRange = blobRange == null ? new BlobRange(0) : blobRange; + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; + + if (prevSnapshotUrl == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("prevSnapshot cannot be null")); + } + try { + new URL(prevSnapshotUrl); + } catch (MalformedURLException ex) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("'prevSnapshotUrl' is not a valid url.", ex)); + } + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse(containerName, blobName, getSnapshotId(), + null, null, prevSnapshotUrl, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), + finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), + finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), + finalRequestConditions.getTagsConditions(), null, null, null, finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), + response.getHeaders(), response.getValue()); } /** @@ -1036,9 +1301,28 @@ public PageBlobItem resize(long size) { @ServiceMethod(returns = ReturnType.SINGLE) public Response resizeWithResponse(long size, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = pageBlobAsyncClient.resizeWithResponse(size, requestConditions, - context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + if (size % PAGE_BYTES != 0) { + // Throwing is preferred to Single.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("size must be a multiple of PageBlobAsyncClient.PAGE_BYTES.")); + } + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() + : requestConditions; + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().resizeWithResponse(containerName, blobName, size, null, + finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, + getCustomerProvidedKey(), encryptionScope, finalContext); + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + + PageBlobsResizeHeaders hd = response.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, null, + hd.getXMsBlobSequenceNumber()); + return new SimpleResponse<>(response, item); } /** @@ -1095,9 +1379,28 @@ public PageBlobItem updateSequenceNumber(SequenceNumberActionType action, @ServiceMethod(returns = ReturnType.SINGLE) public Response updateSequenceNumberWithResponse(SequenceNumberActionType action, Long sequenceNumber, BlobRequestConditions requestConditions, Duration timeout, Context context) { - Mono> response = pageBlobAsyncClient - .updateSequenceNumberWithResponse(action, sequenceNumber, requestConditions, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + if (sequenceNumber != null && sequenceNumber < 0) { + // Throwing is preferred to Single.error because this will error out immediately instead of waiting until + // subscription. + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("SequenceNumber must be greater than or equal to 0.")); + } + BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; + Long finalSequenceNumber = action == SequenceNumberActionType.INCREMENT ? null : sequenceNumber; + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().updateSequenceNumberWithResponse(containerName, blobName, action, null, + finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), + finalSequenceNumber, null, finalContext); + + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + PageBlobsUpdateSequenceNumberHeaders hd = response.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, null, + hd.getXMsBlobSequenceNumber()); + return new SimpleResponse<>(response, item); } /** @@ -1251,7 +1554,28 @@ public Response copyIncrementalWithResponse(String source, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response copyIncrementalWithResponse(PageBlobCopyIncrementalOptions options, Duration timeout, Context context) { - Mono> response = pageBlobAsyncClient.copyIncrementalWithResponse(options, context); - return StorageImplUtils.blockWithOptionalTimeout(response, timeout); + StorageImplUtils.assertNotNull("options", options); + UrlBuilder builder = UrlBuilder.parse(options.getSource()); + builder.setQueryParameter(Constants.UrlConstants.SNAPSHOT_QUERY_PARAMETER, options.getSnapshot()); + PageBlobCopyIncrementalRequestConditions modifiedRequestConditions = (options.getRequestConditions() == null) + ? new PageBlobCopyIncrementalRequestConditions() : options.getRequestConditions(); + + try { + builder.toUrl(); + } catch (MalformedURLException e) { + // We are parsing a valid url and adding a query parameter. If this fails, we can't recover. + throw LOGGER.logExceptionAsError(new IllegalArgumentException(e)); + } + Context finalContext = context == null ? Context.NONE : context; + + Callable> operation = () -> + this.azureBlobStorage.getPageBlobs().copyIncrementalWithResponse(containerName, blobName, + builder.toString(), null, modifiedRequestConditions.getIfModifiedSince(), + modifiedRequestConditions.getIfUnmodifiedSince(), modifiedRequestConditions.getIfMatch(), + modifiedRequestConditions.getIfNoneMatch(), modifiedRequestConditions.getTagsConditions(), null, + finalContext); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsCopyStatus()); } } From d5b035311b7595eb787e4b9e82af15ac6106287c Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 26 Jun 2024 14:29:34 -0700 Subject: [PATCH 03/45] fixing logic for findBlobs --- .../java/com/azure/storage/blob/BlobServiceClient.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 345bc2ba02f24..d5f438d2e0d23 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -506,10 +506,10 @@ public PagedIterable findBlobsByTags(FindBlobsOptions options, D throwOnAnonymousAccess(); StorageImplUtils.assertNotNull("options", options); BiFunction> func = (marker, pageSize) -> { - int finalPageSize = (pageSize != null) ? pageSize : (options.getMaxResultsPerPage() != null - ? options.getMaxResultsPerPage() : Integer.MAX_VALUE); - options.setMaxResultsPerPage(finalPageSize); - return findBlobsByTagsHelper(options, marker, timeout, context); +// int finalPageSize = (pageSize != null) ? pageSize : options.getMaxResultsPerPage(); + FindBlobsOptions finalOptions = (pageSize != null) + ? new FindBlobsOptions(options.getQuery()).setMaxResultsPerPage(pageSize) : options; + return findBlobsByTagsHelper(finalOptions, marker, timeout, context); }; return new PagedIterable<>(() -> func.apply(null, null), marker -> func.apply(marker, null)); } From a3c2050d27f96b5246e8bfca17d08ac57f14ebaf Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 26 Jun 2024 15:46:56 -0700 Subject: [PATCH 04/45] fixing listBlobs include logic --- .../java/com/azure/storage/blob/BlobContainerClient.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index b233b9a5f615f..d7d8e010652a2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1074,11 +1074,14 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin if (pageSize != null) { finalOptions.setMaxResultsPerPage(pageSize); } + ArrayList include = + finalOptions.getDetails().toList().isEmpty() ? null : finalOptions.getDetails().toList(); + Supplier> operation = () -> { ResponseBase response = this.azureBlobStorage.getContainers().listBlobFlatSegmentWithResponse( containerName, finalOptions.getPrefix(), nextMarker, finalOptions.getMaxResultsPerPage(), - finalOptions.getDetails().toList(), null, null, Context.NONE); + include, null, null, Context.NONE); List value = response.getValue().getSegment() == null ? Collections.emptyList() : response.getValue().getSegment().getBlobItems().stream() From cf5475c40665e5ba9e51af09acbecb1811027be3 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 26 Jun 2024 16:50:47 -0700 Subject: [PATCH 05/45] removing commented line --- .../java/com/azure/storage/blob/specialized/BlobClientBase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index b230a9ffa3020..f58257e45f818 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -244,7 +244,6 @@ public BlobClientBase getSnapshotClient(String snapshot) { return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), encryptionScope, getVersionId()); - //return new BlobClientBase(client.getSnapshotClient(snapshot)); } /** From cb231b23739f69ab3103c40da674d9929004af48 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 26 Jun 2024 16:51:20 -0700 Subject: [PATCH 06/45] using final pageblob request conditions --- .../storage/blob/specialized/PageBlobClient.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 1081835233abe..37e55412aa609 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -755,13 +755,13 @@ public Response clearPagesWithResponse(PageRange pageRange, Context finalContext = context == null ? Context.NONE : context; Callable> operation = () -> this.azureBlobStorage.getPageBlobs().clearPagesWithResponse(containerName, blobName, 0, null, pageRangeStr, - pageBlobRequestConditions.getLeaseId(), - pageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), - pageBlobRequestConditions.getIfSequenceNumberLessThan(), - pageBlobRequestConditions.getIfSequenceNumberEqualTo(), - pageBlobRequestConditions.getIfModifiedSince(), - pageBlobRequestConditions.getIfUnmodifiedSince(), pageBlobRequestConditions.getIfMatch(), - pageBlobRequestConditions.getIfNoneMatch(), pageBlobRequestConditions.getTagsConditions(), null, + finalPageBlobRequestConditions.getLeaseId(), + finalPageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), + finalPageBlobRequestConditions.getIfSequenceNumberLessThan(), + finalPageBlobRequestConditions.getIfSequenceNumberEqualTo(), + finalPageBlobRequestConditions.getIfModifiedSince(), + finalPageBlobRequestConditions.getIfUnmodifiedSince(), finalPageBlobRequestConditions.getIfMatch(), + finalPageBlobRequestConditions.getIfNoneMatch(), finalPageBlobRequestConditions.getTagsConditions(), null, getCustomerProvidedKey(), encryptionScope, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); From 941758919943dc70edeecca0108619dae349f17c Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 27 Jun 2024 13:11:23 -0700 Subject: [PATCH 07/45] fixing getBlobClient in containerclient class --- .../main/java/com/azure/storage/blob/BlobContainerClient.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index d7d8e010652a2..03e3592d3f979 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -185,8 +185,7 @@ public final class BlobContainerClient { * @return A new {@link BlobClient} object which references the blob with the specified name in this container. */ public BlobClient getBlobClient(String blobName) { - return new BlobClient(new BlobAsyncClient(getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getBlobContainerName(), blobName, null, getCustomerProvidedKey(), encryptionScope)); + return getBlobClient(blobName, null); } /** From 849c611c5c252a17d7ec2ca2141936c81aa4ad05 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 27 Jun 2024 14:42:22 -0700 Subject: [PATCH 08/45] fixing the async client that created from versionId and snapshot --- .../main/java/com/azure/storage/blob/BlobClient.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index 3147c5fcde343..03818a272f65b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -174,7 +174,10 @@ protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, */ @Override public BlobClient getSnapshotClient(String snapshot) { - return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + BlobAsyncClient asyncClient = new BlobAsyncClient(getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), + encryptionScope, getVersionId()); + return new BlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), encryptionScope, getVersionId()); } @@ -187,7 +190,10 @@ public BlobClient getSnapshotClient(String snapshot) { */ @Override public BlobClient getVersionClient(String versionId) { - return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), + BlobAsyncClient asyncClient = new BlobAsyncClient(getHttpPipeline(), getAccountUrl(), getServiceVersion(), + getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), + encryptionScope, versionId); + return new BlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), encryptionScope, versionId); } From f889874525d87f6914b3b06a14d5e9870cbccecc Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 27 Jun 2024 16:07:02 -0700 Subject: [PATCH 09/45] fixed lambda function for listing apis --- .../storage/blob/BlobContainerClient.java | 10 +++---- .../azure/storage/blob/BlobServiceClient.java | 3 +- .../blob/specialized/BlobClientBase.java | 28 ++++++------------- 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 03e3592d3f979..24434870c4f5c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1210,7 +1210,7 @@ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsO } return listBlobsHierarchySegment(marker, delimiter, finalOptions, timeout); }; - return new PagedIterable<>(() -> func.apply(null, null), marker -> func.apply(marker, null)); + return new PagedIterable<>(pageSize -> func.apply(null, pageSize), func); } private PagedResponse listBlobsHierarchySegment(String marker, String delimiter, ListBlobsOptions options, @@ -1287,19 +1287,17 @@ public PagedIterable findBlobsByTags(FindBlobsOptions options, D StorageImplUtils.assertNotNull("options", options); BiFunction> func = (marker, pageSize) -> { // Use pageSize if provided, otherwise use maxResultsPerPage from options - int finalPageSize = (pageSize != null) ? pageSize : (options.getMaxResultsPerPage() != null ? options.getMaxResultsPerPage() : Integer.MAX_VALUE); - FindBlobsOptions finalOptions = new FindBlobsOptions(options.getQuery()).setMaxResultsPerPage(finalPageSize); + FindBlobsOptions finalOptions = (pageSize != null) + ? new FindBlobsOptions(options.getQuery()).setMaxResultsPerPage(pageSize) : options; return findBlobsByTagsHelper(finalOptions, marker, timeout, context); }; - return new PagedIterable<>(() -> func.apply(null, null), marker -> func.apply(marker, null)); + return new PagedIterable<>(pageSize -> func.apply(null, pageSize), func); } private PagedResponse findBlobsByTagsHelper( FindBlobsOptions options, String marker, Duration timeout, Context context) { - - StorageImplUtils.assertNotNull("options", options); Callable> operation = () -> this.azureBlobStorage.getContainers().filterBlobsWithResponse( containerName, null, null, options.getQuery(), marker, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index d5f438d2e0d23..db490b2061489 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -506,12 +506,11 @@ public PagedIterable findBlobsByTags(FindBlobsOptions options, D throwOnAnonymousAccess(); StorageImplUtils.assertNotNull("options", options); BiFunction> func = (marker, pageSize) -> { -// int finalPageSize = (pageSize != null) ? pageSize : options.getMaxResultsPerPage(); FindBlobsOptions finalOptions = (pageSize != null) ? new FindBlobsOptions(options.getQuery()).setMaxResultsPerPage(pageSize) : options; return findBlobsByTagsHelper(finalOptions, marker, timeout, context); }; - return new PagedIterable<>(() -> func.apply(null, null), marker -> func.apply(marker, null)); + return new PagedIterable<>(pageSize -> func.apply(null, pageSize), func); } private PagedResponse findBlobsByTagsHelper(FindBlobsOptions options, String marker, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index f58257e45f818..b0a6df94b76ca 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -2472,7 +2472,7 @@ public InputStream openQueryInputStream(String expression) { @ServiceMethod(returns = ReturnType.SINGLE) public Response openQueryInputStreamWithResponse(BlobQueryOptions queryOptions) { StorageImplUtils.assertNotNull("options", queryOptions); - StorageImplUtils.assertNotNull("outputStream", queryOptions.getOutputStream()); + //StorageImplUtils.assertNotNull("outputStream", queryOptions.getOutputStream()); BlobRequestConditions requestConditions = queryOptions.getRequestConditions() == null ? new BlobRequestConditions() : queryOptions.getRequestConditions(); QuerySerialization in = BlobQueryReader.transformInputSerialization(queryOptions.getInputSerialization(), @@ -2485,26 +2485,14 @@ public Response openQueryInputStreamWithResponse(BlobQueryOptions q .setInputSerialization(in) .setOutputSerialization(out); - try { - ResponseBase response = this.azureBlobStorage.getBlobs().queryWithResponse( - containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, qr, getCustomerProvidedKey(), Context.NONE); - - InputStream inputStream = response.getValue(); - OutputStream outputStream = queryOptions.getOutputStream(); - - byte[] buffer = new byte[4096]; - int bytesRead; - while ((bytesRead = inputStream.read(buffer)) != -1) { - outputStream.write(buffer, 0, bytesRead); - } + ResponseBase response = this.azureBlobStorage.getBlobs().queryWithResponse( + containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), + null, qr, getCustomerProvidedKey(), Context.NONE); + InputStream inputStream = response.getValue(); - return new SimpleResponse<>(response, inputStream); - } catch (IOException e) { - throw new UncheckedIOException("Failed to read query results or write to the output stream", e); - } + return new SimpleResponse<>(response, inputStream); } /** From 6a26ca64e79336818134b0cb8dffdbbbed0495ff Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 27 Jun 2024 17:41:32 -0700 Subject: [PATCH 10/45] fixing pageList method --- .../blob/specialized/PageBlobClient.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 37e55412aa609..bd1b5d5508db5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -71,6 +71,7 @@ import java.util.Map; import java.util.Objects; import java.util.concurrent.Callable; +import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -1123,24 +1124,24 @@ public PagedIterable listPageRangesDiff(ListPageRangesDiffOptions Objects.requireNonNull(options, "options must not be null"); Context finalContext = context == null ? Context.NONE : context; - // Helper function to retrieve a page of items - Function> pageRetriever = continuationToken -> { + BiFunction> pageRetriever = (continuationToken, pageSize) -> { BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions() : options.getRequestConditions(); - Integer pageSize = options.getMaxResultsPerPage(); - // Call the synchronous service method + // Dynamically use pageSize provided during the iteration if available + Integer finalPageSize = pageSize != null ? pageSize : options.getMaxResultsPerPage(); + Callable> operation = () -> - this.azureBlobStorage.getPageBlobs() - .getPageRangesDiffWithResponse(containerName, blobName, getSnapshotId(), null, - options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), + this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse( + containerName, blobName, getSnapshotId(), null, + options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), - null, continuationToken, pageSize, finalContext); + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, continuationToken, finalPageSize, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - List value = parsePageRangeItems(response.getValue()); return new PagedResponseBase<>( @@ -1151,8 +1152,7 @@ public PagedIterable listPageRangesDiff(ListPageRangesDiffOptions PageListHelper.getNextMarker(response.getValue()), response.getDeserializedHeaders()); }; - - return new PagedIterable<>(() -> pageRetriever.apply(null), pageRetriever); + return new PagedIterable<>(pageSize -> pageRetriever.apply(null, pageSize), pageRetriever); } /** From 6591665bf82b4da41c3def35104f2b4a9ef56840 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 27 Jun 2024 18:53:59 -0700 Subject: [PATCH 11/45] adding changes from xml removal --- .../JacksonDatabindRemovalTransform.java | 3 ++ .../checkstyle-suppressions.xml | 1 - sdk/storage/azure-storage-blob/pom.xml | 25 ++------------ .../azure-storage-blob/spotbugs-exclude.xml | 14 ++++++++ .../models/BlobHierarchyListSegment.java | 6 ++-- .../models/BlobPrefixInternal.java | 4 +-- .../models/BlobSignedIdentifierWrapper.java | 18 ++++++++++ .../blob/models/BlobDownloadHeaders.java | 6 ---- .../azure/storage/blob/models/BlobItem.java | 9 ----- .../blob/models/BlobItemProperties.java | 6 ---- .../storage/blob/models/BlobQueryHeaders.java | 6 ---- .../blob/models/BlobServiceStatistics.java | 4 +-- .../src/main/java/module-info.java | 15 +++------ .../azure-storage-blob/swagger/README.md | 6 ++++ .../main/java/BlobStorageCustomization.java | 33 ++++++++++++++++--- 15 files changed, 83 insertions(+), 73 deletions(-) diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/revapi/transforms/JacksonDatabindRemovalTransform.java b/eng/code-quality-reports/src/main/java/com/azure/tools/revapi/transforms/JacksonDatabindRemovalTransform.java index 0dfd9ba4b4b71..e5456088e65cd 100644 --- a/eng/code-quality-reports/src/main/java/com/azure/tools/revapi/transforms/JacksonDatabindRemovalTransform.java +++ b/eng/code-quality-reports/src/main/java/com/azure/tools/revapi/transforms/JacksonDatabindRemovalTransform.java @@ -134,6 +134,9 @@ private static boolean shouldDiscard(String packageName) { } else if (packageName.regionMatches(18, "queue.models", 0, 12)) { // Queue return true; + } else if (packageName.regionMatches(18, "blob.", 0, 5)) { + // Blob + return packageName.regionMatches(23, "models", 0, 6) || packageName.regionMatches(23, "options", 0, 7); } } else if (packageName.regionMatches(10, "communication.", 0, 14)) { if (packageName.regionMatches(24, "jobrouter.models", 0, 16)) { diff --git a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml index 819e93565097b..f106f985d40b3 100644 --- a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml +++ b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml @@ -19,7 +19,6 @@ - diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 2eb801700e2fb..a7bdb0d96ac0f 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -89,9 +89,9 @@ - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - 2.13.5 + com.azure + azure-xml + 1.0.0 - - - - - com.fasterxml.jackson.dataformat:jackson-dataformat-xml:[2.13.5] - - - - - - - - inject-sas-service-version diff --git a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml index 7cc69165ae3ad..791b867d04157 100644 --- a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml +++ b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml @@ -32,6 +32,11 @@ + + + + + @@ -40,6 +45,8 @@ + + @@ -92,6 +99,11 @@ + + + + + @@ -100,6 +112,8 @@ + + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java index 71514efeff355..53faf5d6be4a6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java @@ -87,7 +87,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStartElement(rootElementName); if (this.blobPrefixes != null) { for (BlobPrefixInternal element : this.blobPrefixes) { - xmlWriter.writeXml(element, "BlobPrefixInternal"); + xmlWriter.writeXml(element, "BlobPrefix"); } } if (this.blobItems != null) { @@ -129,12 +129,12 @@ public static BlobHierarchyListSegment fromXml(XmlReader xmlReader, String rootE BlobHierarchyListSegment deserializedBlobHierarchyListSegment = new BlobHierarchyListSegment(); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("BlobPrefixInternal".equals(elementName.getLocalPart())) { + if ("BlobPrefix".equals(elementName.getLocalPart())) { if (deserializedBlobHierarchyListSegment.blobPrefixes == null) { deserializedBlobHierarchyListSegment.blobPrefixes = new ArrayList<>(); } deserializedBlobHierarchyListSegment.blobPrefixes - .add(BlobPrefixInternal.fromXml(reader, "BlobPrefixInternal")); + .add(BlobPrefixInternal.fromXml(reader, "BlobPrefix")); } else if ("Blob".equals(elementName.getLocalPart())) { if (deserializedBlobHierarchyListSegment.blobItems == null) { deserializedBlobHierarchyListSegment.blobItems = new ArrayList<>(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java index 14c1512fd8034..689e76da46424 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java @@ -56,7 +56,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefixInternal" : rootElementName; + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.name, "Name"); return xmlWriter.writeEndElement(); @@ -87,7 +87,7 @@ public static BlobPrefixInternal fromXml(XmlReader xmlReader) throws XMLStreamEx * @throws XMLStreamException If an error occurs while reading the BlobPrefixInternal. */ public static BlobPrefixInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefixInternal" : rootElementName; + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobPrefixInternal deserializedBlobPrefixInternal = new BlobPrefixInternal(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java index 40d452c9dd172..cad48305163e8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java @@ -57,10 +57,28 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt return xmlWriter.writeEndElement(); } + /** + * Reads an instance of BlobSignedIdentifierWrapper from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobSignedIdentifierWrapper if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobSignedIdentifierWrapper. + */ public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader) throws XMLStreamException { return fromXml(xmlReader, null); } + /** + * Reads an instance of BlobSignedIdentifierWrapper from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobSignedIdentifierWrapper if the XmlReader was pointing to an instance of it, or null if + * it was pointing to XML null. + * @throws XMLStreamException If an error occurs while reading the BlobSignedIdentifierWrapper. + */ public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "SignedIdentifiers" : rootElementName; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java index 31b0b16ff1e42..3c8412d596b01 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadHeaders.java @@ -9,9 +9,6 @@ import com.azure.storage.blob.implementation.accesshelpers.BlobDownloadHeadersConstructorProxy; import com.azure.storage.blob.implementation.models.BlobsDownloadHeaders; import com.azure.storage.blob.implementation.util.ModelHelper; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Collections; @@ -22,10 +19,8 @@ /** * Defines headers for Download operation. */ -@JacksonXmlRootElement(localName = "Blob-Download-Headers") @Fluent public final class BlobDownloadHeaders { - @JsonUnwrapped private final BlobsDownloadHeaders internalHeaders; static { @@ -48,7 +43,6 @@ public BlobDownloadHeaders() { /* * The errorCode property. */ - @JsonProperty(value = "x-ms-error-code") private String errorCode; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java index 56707d20e483b..58428cff1f7a1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItem.java @@ -8,9 +8,6 @@ import com.azure.storage.blob.implementation.accesshelpers.BlobItemPropertiesConstructorProxy; import com.azure.storage.blob.implementation.models.BlobItemInternal; import com.azure.storage.blob.implementation.models.BlobName; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.util.List; import java.util.Map; @@ -24,10 +21,8 @@ /** * An Azure Storage blob. */ -@JacksonXmlRootElement(localName = "Blob") @Fluent public final class BlobItem { - @JsonUnwrapped private final BlobItemInternal blobItemInternal; static { @@ -47,16 +42,12 @@ public BlobItem() { this.blobItemInternal = new BlobItemInternal(); } - @JsonIgnore private String convertedName; - @JsonIgnore private BlobItemProperties convertedProperties; - @JsonIgnore private Map convertedTags; - @JsonIgnore private List convertedObjectReplicationSourcePolicies; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java index f735c7535121a..98f287899bc3b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java @@ -6,19 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.storage.blob.implementation.accesshelpers.BlobItemPropertiesConstructorProxy; import com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** * Properties of a blob. */ -@JacksonXmlRootElement(localName = "Properties") @Fluent public final class BlobItemProperties { - @JsonUnwrapped private final BlobItemPropertiesInternal internalProperties; static { @@ -49,7 +44,6 @@ public BlobItemProperties() { this.internalProperties = new BlobItemPropertiesInternal(); } - @JsonIgnore private BlobImmutabilityPolicy convertedImmutabilityPolicy; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryHeaders.java index bf19e862fe64e..2b235727b5a8e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobQueryHeaders.java @@ -8,9 +8,6 @@ import com.azure.core.http.HttpHeaders; import com.azure.storage.blob.implementation.accesshelpers.BlobQueryHeadersConstructorProxy; import com.azure.storage.blob.implementation.models.BlobsQueryHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; import java.util.Map; @@ -18,10 +15,8 @@ /** * Defines headers for Query operation. */ -@JacksonXmlRootElement(localName = "Blob-Query-Headers") @Fluent public final class BlobQueryHeaders { - @JsonUnwrapped private final BlobsQueryHeaders internalHeaders; static { @@ -31,7 +26,6 @@ public final class BlobQueryHeaders { /* * The errorCode property. */ - @JsonProperty(value = "x-ms-error-code") private String errorCode; private BlobQueryHeaders(BlobsQueryHeaders internalHeaders) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java index 8d06e6aeac055..dd9cf49cd1ba3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java @@ -56,7 +56,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobServiceStatistics" : rootElementName; + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceStats" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeXml(this.geoReplication, "GeoReplication"); return xmlWriter.writeEndElement(); @@ -86,7 +86,7 @@ public static BlobServiceStatistics fromXml(XmlReader xmlReader) throws XMLStrea */ public static BlobServiceStatistics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobServiceStatistics" : rootElementName; + = CoreUtils.isNullOrEmpty(rootElementName) ? "StorageServiceStats" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { BlobServiceStatistics deserializedBlobServiceStatistics = new BlobServiceStatistics(); while (reader.nextElement() != XmlToken.END_ELEMENT) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/module-info.java b/sdk/storage/azure-storage-blob/src/main/java/module-info.java index dd7cb19749442..4440b9bcbfb7e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/module-info.java @@ -4,7 +4,6 @@ module com.azure.storage.blob { requires transitive com.azure.storage.common; - requires com.fasterxml.jackson.dataformat.xml; requires com.azure.storage.internal.avro; exports com.azure.storage.blob; @@ -27,17 +26,11 @@ com.azure.storage.blob.cryptography, com.azure.storage.file.datalake, com.azure.storage.blob.changefeed, - com.fasterxml.jackson.databind, + com.azure.core, com.azure.storage.blob.batch, com.azure.storage.blob.nio; - opens com.azure.storage.blob.models to - com.fasterxml.jackson.databind, - com.azure.core; - opens com.azure.storage.blob.implementation to - com.fasterxml.jackson.databind, - com.azure.core; - opens com.azure.storage.blob.implementation.models to - com.fasterxml.jackson.databind, - com.azure.core; + opens com.azure.storage.blob.models to com.azure.core; + opens com.azure.storage.blob.implementation to com.azure.core; + opens com.azure.storage.blob.implementation.models to com.azure.core; } diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index 930759ab0a8bf..19d4ca593472c 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -404,6 +404,12 @@ directive: - rename-model: from: BlobPrefix to: BlobPrefixInternal + +- from: swagger-document + where: $.definitions + transform: > + $.BlobServiceStatistics.xml = { "name": "StorageServiceStats" }; + $.BlobPrefixInternal.xml = { "name": "BlobPrefix" }; ``` ### BlobAccessPolicy and BlobSignedIdentifier diff --git a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java index 5fbe4795e4c2d..a6304a649507b 100644 --- a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java +++ b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java @@ -1,8 +1,10 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import com.azure.autorest.customization.ClassCustomization; import com.azure.autorest.customization.Customization; +import com.azure.autorest.customization.JavadocCustomization; import com.azure.autorest.customization.LibraryCustomization; import com.azure.autorest.customization.PackageCustomization; import com.github.javaparser.StaticJavaParser; @@ -110,6 +112,10 @@ public void customize(LibraryCustomization customization, Logger logger) { ClassCustomization blobFlatListSegment = implementationModels.getClass("BlobFlatListSegment"); customizeBlobFlatListSegment(blobFlatListSegment); + //BlobSignedIdentifierWrapper + ClassCustomization blobSignedIdentifierWrapper = implementationModels.getClass("BlobSignedIdentifierWrapper"); + customizeBlobSignedIdentifierWrapper(blobSignedIdentifierWrapper); + } private static void customizeQueryFormat(ClassCustomization classCustomization) { String fileContent = classCustomization.getEditor().getFileContent(classCustomization.getFileName()); @@ -118,7 +124,6 @@ private static void customizeQueryFormat(ClassCustomization classCustomization) fileContent = fileContent.replace("deserializedQueryFormat.parquetTextConfiguration = reader.null;", "deserializedQueryFormat.parquetTextConfiguration = new Object();\nxmlReader.skipElement();"); classCustomization.getEditor().replaceFile(classCustomization.getFileName(), fileContent); - } private static void customizeBlobHierarchyListSegment(ClassCustomization classCustomization){ @@ -132,7 +137,7 @@ private static void customizeBlobHierarchyListSegment(ClassCustomization classCu "xmlWriter.writeStartElement(rootElementName);", "if (this.blobPrefixes != null) {", " for (BlobPrefixInternal element : this.blobPrefixes) {", - " xmlWriter.writeXml(element, \"BlobPrefixInternal\");", + " xmlWriter.writeXml(element, \"BlobPrefix\");", " }", "}", "if (this.blobItems != null) {", @@ -154,12 +159,12 @@ private static void customizeBlobHierarchyListSegment(ClassCustomization classCu " while (reader.nextElement() != XmlToken.END_ELEMENT) {", " QName elementName = reader.getElementName();", "", - " if (\"BlobPrefixInternal\".equals(elementName.getLocalPart())) {", + " if (\"BlobPrefix\".equals(elementName.getLocalPart())) {", " if (deserializedBlobHierarchyListSegment.blobPrefixes == null) {", " deserializedBlobHierarchyListSegment.blobPrefixes = new ArrayList<>();", " }", " deserializedBlobHierarchyListSegment.blobPrefixes", - " .add(BlobPrefixInternal.fromXml(reader, \"BlobPrefixInternal\"));", + " .add(BlobPrefixInternal.fromXml(reader, \"BlobPrefix\"));", " } else if (\"Blob\".equals(elementName.getLocalPart())) {", " if (deserializedBlobHierarchyListSegment.blobItems == null) {", " deserializedBlobHierarchyListSegment.blobItems = new ArrayList<>();", @@ -177,7 +182,7 @@ private static void customizeBlobHierarchyListSegment(ClassCustomization classCu }); } - private static void customizeBlobFlatListSegment(ClassCustomization classCustomization) { + private static void customizeBlobFlatListSegment(ClassCustomization classCustomization){ classCustomization.customizeAst(ast -> { ClassOrInterfaceDeclaration clazz = ast.getClassByName(classCustomization.getClassName()).get(); @@ -219,4 +224,22 @@ private static void customizeBlobFlatListSegment(ClassCustomization classCustomi )); }); } + + private static void customizeBlobSignedIdentifierWrapper(ClassCustomization classCustomization) { + JavadocCustomization javadocfromXml = classCustomization.getMethod("fromXml(XmlReader xmlReader)").getJavadoc(); + javadocfromXml.setDescription("Reads an instance of BlobSignedIdentifierWrapper from the XmlReader."); + javadocfromXml.setParam("xmlReader", "The XmlReader being read."); + javadocfromXml.setReturn("An instance of BlobSignedIdentifierWrapper if the XmlReader was pointing to an " + + "instance of it, or null if it was pointing to XML null."); + javadocfromXml.addThrows("XMLStreamException", "If an error occurs while reading the BlobSignedIdentifierWrapper."); + + JavadocCustomization javadocfromXmlWithRoot = classCustomization.getMethod("fromXml(XmlReader xmlReader, String rootElementName)").getJavadoc(); + javadocfromXmlWithRoot.setDescription("Reads an instance of BlobSignedIdentifierWrapper from the XmlReader."); + javadocfromXmlWithRoot.setParam("xmlReader", "The XmlReader being read."); + javadocfromXmlWithRoot.setParam("rootElementName", "Optional root element name to override the default defined " + + "by the model. Used to support cases where the model can deserialize from different root element names."); + javadocfromXmlWithRoot.setReturn("An instance of BlobSignedIdentifierWrapper if the XmlReader was pointing to an " + + "instance of it, or null if it was pointing to XML null."); + javadocfromXmlWithRoot.addThrows("XMLStreamException", "If an error occurs while reading the BlobSignedIdentifierWrapper."); + } } From 7f70d75f7be9b3738fd4e9099ae73e76fbd7d0c7 Mon Sep 17 00:00:00 2001 From: Rabab Date: Fri, 28 Jun 2024 12:01:17 -0700 Subject: [PATCH 12/45] adding xml migration changes --- .../SignedIdentifiersWrapper.java | 38 -------- .../models/DataLakeStorageError.java | 41 --------- .../models/DataLakeStorageErrorDetails.java | 66 -------------- .../models/DataLakeStorageErrorException.java | 37 -------- .../blob/models/PageListDeserializer.java | 87 ------------------- 5 files changed, 269 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageError.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorDetails.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorException.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java deleted file mode 100644 index 618eba1297e96..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/SignedIdentifiersWrapper.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.implementation; - -import com.azure.storage.blob.models.BlobSignedIdentifier; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; -import java.util.List; - -/** A wrapper around List<BlobSignedIdentifier> which provides top-level metadata for serialization. */ -@JacksonXmlRootElement(localName = "SignedIdentifiers") -public final class SignedIdentifiersWrapper { - @JacksonXmlProperty(localName = "SignedIdentifier") - private final List signedIdentifiers; - - /** - * Creates an instance of SignedIdentifiersWrapper. - * - * @param signedIdentifiers the list. - */ - @JsonCreator - public SignedIdentifiersWrapper(@JsonProperty("SignedIdentifier") List signedIdentifiers) { - this.signedIdentifiers = signedIdentifiers; - } - - /** - * Get the List<BlobSignedIdentifier> contained in this wrapper. - * - * @return the List<BlobSignedIdentifier>. - */ - public List items() { - return signedIdentifiers; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageError.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageError.java deleted file mode 100644 index 18212c908e572..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageError.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.implementation.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** The DataLakeStorageError model. */ -@JacksonXmlRootElement(localName = "DataLakeStorageError") -@Fluent -public final class DataLakeStorageError { - /* - * The service error response object. - */ - @JsonProperty(value = "error") - private DataLakeStorageErrorDetails dataLakeStorageErrorDetails; - - /** - * Get the dataLakeStorageErrorDetails property: The service error response object. - * - * @return the dataLakeStorageErrorDetails value. - */ - public DataLakeStorageErrorDetails getDataLakeStorageErrorDetails() { - return this.dataLakeStorageErrorDetails; - } - - /** - * Set the dataLakeStorageErrorDetails property: The service error response object. - * - * @param dataLakeStorageErrorDetails the dataLakeStorageErrorDetails value to set. - * @return the DataLakeStorageError object itself. - */ - public DataLakeStorageError setDataLakeStorageErrorDetails( - DataLakeStorageErrorDetails dataLakeStorageErrorDetails) { - this.dataLakeStorageErrorDetails = dataLakeStorageErrorDetails; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorDetails.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorDetails.java deleted file mode 100644 index ef53eb150ca71..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorDetails.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.implementation.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; - -/** The service error response object. */ -@JacksonXmlRootElement(localName = "DataLakeStorageErrorError") -@Fluent -public final class DataLakeStorageErrorDetails { - /* - * The service error code. - */ - @JsonProperty(value = "Code") - private String code; - - /* - * The service error message. - */ - @JsonProperty(value = "Message") - private String message; - - /** - * Get the code property: The service error code. - * - * @return the code value. - */ - public String getCode() { - return this.code; - } - - /** - * Set the code property: The service error code. - * - * @param code the code value to set. - * @return the DataLakeStorageErrorError object itself. - */ - public DataLakeStorageErrorDetails setCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: The service error message. - * - * @return the message value. - */ - public String getMessage() { - return this.message; - } - - /** - * Set the message property: The service error message. - * - * @param message the message value to set. - * @return the DataLakeStorageErrorError object itself. - */ - public DataLakeStorageErrorDetails setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorException.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorException.java deleted file mode 100644 index 8a4849c82bb54..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DataLakeStorageErrorException.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.storage.blob.implementation.models; - -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.HttpResponse; - -/** Exception thrown for an invalid response with DataLakeStorageError information. */ -public final class DataLakeStorageErrorException extends HttpResponseException { - /** - * Initializes a new instance of the DataLakeStorageErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public DataLakeStorageErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the DataLakeStorageErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public DataLakeStorageErrorException(String message, HttpResponse response, DataLakeStorageError value) { - super(message, response, value); - } - - @Override - public DataLakeStorageError getValue() { - return (DataLakeStorageError) super.getValue(); - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java deleted file mode 100644 index a098d2bc86f2c..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PageListDeserializer.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.models; - -import com.azure.storage.blob.implementation.models.PageListHelper; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.core.JsonTokenId; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; - -import java.io.IOException; -import java.util.ArrayList; - -/** - * Custom Jackson JsonDeserializer that handles deserializing PageList responses. - *

- * PageList responses intersperse PageRange and ClearRange elements, without this deserializer if we received the - * following response the resulting PageList would only contain one PageRange element and one ClearRange element. - * - *

- * {@code
- * 
- * 
- *    
- *       Start Byte
- *       End Byte
- *    
- *    
- *       Start Byte
- *       End Byte
- *    
- *    
- *       Start Byte
- *       End Byte
- *    
- * 
- * }
- * 
- * - * With the custom deserializer the response correctly returns two PageRange elements and one ClearRange element. - */ -final class PageListDeserializer extends JsonDeserializer { - /* - * Added as of Jackson 2.12 as empty/missing XML was no longer triggering deserialize. - */ - @Override - public PageList getNullValue(DeserializationContext ctxt) { - return new PageList(); - } - - @Override - public PageList deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - ArrayList pageRanges = new ArrayList<>(); - ArrayList clearRanges = new ArrayList<>(); - String nextMarker = null; - - // Get the deserializer that handles PageRange. - JsonDeserializer pageRangeDeserializer = - ctxt.findRootValueDeserializer(ctxt.constructType(PageRange.class)); - - // Get the deserializer that handles ClearRange. - JsonDeserializer clearRangeDeserializer = - ctxt.findRootValueDeserializer(ctxt.constructType(ClearRange.class)); - - for (JsonToken currentToken = p.nextToken(); currentToken.id() != JsonTokenId.ID_END_OBJECT; - currentToken = p.nextToken()) { - // Get to the root element of the next item. - p.nextToken(); - - if (p.getCurrentName().equals("PageRange")) { - // Current token is the node that begins a PageRange object. - pageRanges.add((PageRange) pageRangeDeserializer.deserialize(p, ctxt)); - } else if (p.getCurrentName().equals("ClearRange")) { - // Current token is the node that begins a ClearRange object. - clearRanges.add((ClearRange) clearRangeDeserializer.deserialize(p, ctxt)); - } else if (p.getCurrentName().equals("NextMarker")) { - // Current token is the next marker - nextMarker = "null".equals(p.getText()) ? null : p.getText(); - } - } - - return PageListHelper.setNextMarker(new PageList().setPageRange(pageRanges).setClearRange(clearRanges), - nextMarker); - } -} From 34b128848ee6a6642dfd8a1102fcfa3a36533f54 Mon Sep 17 00:00:00 2001 From: Rabab Date: Fri, 28 Jun 2024 12:14:40 -0700 Subject: [PATCH 13/45] copying changes from xml migration pr --- .../azure-storage-file-datalake/src/main/java/module-info.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/module-info.java b/sdk/storage/azure-storage-file-datalake/src/main/java/module-info.java index b3573a17cc8f1..daff63b6b0fa1 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/module-info.java @@ -4,8 +4,6 @@ module com.azure.storage.file.datalake { requires transitive com.azure.storage.blob; - requires com.azure.json; - exports com.azure.storage.file.datalake; exports com.azure.storage.file.datalake.models; exports com.azure.storage.file.datalake.sas; From c814194f4f26c9f7698ec9c8c9b9cc9a0f546eaf Mon Sep 17 00:00:00 2001 From: Rabab Date: Mon, 1 Jul 2024 15:10:32 -0700 Subject: [PATCH 14/45] removing all references of xmlJackson --- .../models/BlobsGetAccessControlHeaders.java | 13 +-- .../models/BlobsRenameHeaders.java | 11 +-- .../models/BlobsSetAccessControlHeaders.java | 9 +- .../models/DirectoriesCreateHeaders.java | 10 -- .../models/DirectoriesDeleteHeaders.java | 9 +- .../DirectoriesGetAccessControlHeaders.java | 13 +-- .../models/DirectoriesRenameHeaders.java | 12 +-- .../DirectoriesSetAccessControlHeaders.java | 9 +- .../models/DirectoryHttpHeaders.java | 9 +- ...PageBlobsGetPageRangesDiffNextHeaders.java | 11 +-- .../PageBlobsGetPageRangesNextHeaders.java | 11 +-- .../models/PageListCollection.java | 82 +++++++++++++++-- .../models/PageListSegment.java | 91 +++++++++++++++++-- .../azure/storage/blob/models/BlobPrefix.java | 69 +++++++++++++- 14 files changed, 234 insertions(+), 125 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java index 6239b3070a4ee..909c46f8ce4ac 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,66 +7,54 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The BlobsGetAccessControlHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class BlobsGetAccessControlHeaders { /* * The x-ms-group property. */ - @JsonProperty(value = "x-ms-group") private String xMsGroup; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-acl property. */ - @JsonProperty(value = "x-ms-acl") private String xMsAcl; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-permissions property. */ - @JsonProperty(value = "x-ms-permissions") private String xMsPermissions; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /* * The x-ms-owner property. */ - @JsonProperty(value = "x-ms-owner") private String xMsOwner; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java index c09e33c1ad03e..ca9fe28dc763e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,54 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The BlobsRenameHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class BlobsRenameHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The Content-Length property. */ - @JsonProperty(value = "Content-Length") private Long contentLength; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java index 3cb5bf9c195cb..7ad15539e2344 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,42 +7,34 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The BlobsSetAccessControlHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class BlobsSetAccessControlHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesCreateHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesCreateHeaders.java index 406800c3d3029..ebf8ea2a2d72c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesCreateHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesCreateHeaders.java @@ -6,54 +6,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The DirectoriesCreateHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class DirectoriesCreateHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The Content-Length property. */ - @JsonProperty(value = "Content-Length") private Long contentLength; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java index 2b8c573fa68c6..a444220fadafd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,42 +7,34 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The DirectoriesDeleteHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class DirectoriesDeleteHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-continuation property. */ - @JsonProperty(value = "x-ms-continuation") private String xMsContinuation; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java index d3fda685d5297..10a523850a75c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,66 +7,54 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The DirectoriesGetAccessControlHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class DirectoriesGetAccessControlHeaders { /* * The x-ms-group property. */ - @JsonProperty(value = "x-ms-group") private String xMsGroup; /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The x-ms-acl property. */ - @JsonProperty(value = "x-ms-acl") private String xMsAcl; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-permissions property. */ - @JsonProperty(value = "x-ms-permissions") private String xMsPermissions; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /* * The x-ms-owner property. */ - @JsonProperty(value = "x-ms-owner") private String xMsOwner; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java index 0626e52581729..cde3602432729 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,60 +7,49 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The DirectoriesRenameHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class DirectoriesRenameHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The Content-Length property. */ - @JsonProperty(value = "Content-Length") private Long contentLength; /* * The x-ms-continuation property. */ - @JsonProperty(value = "x-ms-continuation") private String xMsContinuation; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java index 33f16b5c28c78..d62cf62aa6676 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,42 +7,34 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The DirectoriesSetAccessControlHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class DirectoriesSetAccessControlHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java index 34a3c8585f392..a759b8b30e80d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -5,41 +6,33 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; /** Parameter group. */ -@JacksonXmlRootElement(localName = "DirectoryHttpHeaders") @Fluent public final class DirectoryHttpHeaders { /* * Cache control for given resource */ - @JsonProperty(value = "cacheControl") private String cacheControl; /* * Content type for given resource */ - @JsonProperty(value = "contentType") private String contentType; /* * Content encoding for given resource */ - @JsonProperty(value = "contentEncoding") private String contentEncoding; /* * Content language for given resource */ - @JsonProperty(value = "contentLanguage") private String contentLanguage; /* * Content disposition for given resource */ - @JsonProperty(value = "contentDisposition") private String contentDisposition; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java index ea0270911aef6..37e88c0c16783 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,54 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The PageBlobsGetPageRangesDiffNextHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class PageBlobsGetPageRangesDiffNextHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-blob-content-length property. */ - @JsonProperty(value = "x-ms-blob-content-length") private Long xMsBlobContentLength; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java index c1bc081a9a17d..3ba0c564f8962 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -6,54 +7,44 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import java.time.OffsetDateTime; /** The PageBlobsGetPageRangesNextHeaders model. */ -@JacksonXmlRootElement(localName = "null") @Fluent public final class PageBlobsGetPageRangesNextHeaders { /* * The x-ms-version property. */ - @JsonProperty(value = "x-ms-version") private String xMsVersion; /* * The x-ms-blob-content-length property. */ - @JsonProperty(value = "x-ms-blob-content-length") private Long xMsBlobContentLength; /* * The ETag property. */ - @JsonProperty(value = "ETag") private String eTag; /* * The Last-Modified property. */ - @JsonProperty(value = "Last-Modified") private DateTimeRfc1123 lastModified; /* * The x-ms-request-id property. */ - @JsonProperty(value = "x-ms-request-id") private String xMsRequestId; /* * The x-ms-client-request-id property. */ - @JsonProperty(value = "x-ms-client-request-id") private String xMsClientRequestId; /* * The Date property. */ - @JsonProperty(value = "Date") private DateTimeRfc1123 dateProperty; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java index ed7548f24962a..b74697380e783 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -5,26 +6,29 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.storage.blob.models.PageRange; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; /** The PageListCollection model. */ -@JacksonXmlRootElement(localName = "PageList") @Fluent -public final class PageListCollection { +public final class PageListCollection implements XmlSerializable { /* * The value property. */ - @JsonProperty("PageRange") private List value = new ArrayList<>(); /* * The nextMarker property. */ - @JsonProperty(value = "nextMarker") private String nextMarker; /** @@ -66,4 +70,70 @@ public PageListCollection setNextMarker(String nextMarker) { this.nextMarker = nextMarker; return this; } + + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.value != null) { + for (PageRange element: this.value) { + xmlWriter.writeXml(element, "PageRange"); + } + } + xmlWriter.writeStringElement("nextMarker", this.nextMarker); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of PageListCollection from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of PageListCollection if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the PageListCollection. + */ + public static PageListCollection fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of PageListCollection from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of PageListCollection if the XmlReader was pointing to an instance of it, or null if it was pointing + * to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the PageListCollection. + */ + public static PageListCollection fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageList" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + PageListCollection deserializedPageListCollection = new PageListCollection(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("PageRange".equals(elementName.getLocalPart())) { + if (deserializedPageListCollection.value == null) { + deserializedPageListCollection.value = new ArrayList<>(); + } + deserializedPageListCollection.value.add(PageRange.fromXml(reader, "PageRange")); + } else if ("nextMarker".equals(elementName.getLocalPart())) { + deserializedPageListCollection.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedPageListCollection; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java index 43b275673f6d1..9e26acce52981 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. @@ -5,33 +6,35 @@ package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.storage.blob.models.ClearRange; import com.azure.storage.blob.models.PageRange; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; import java.util.ArrayList; import java.util.List; /** The PageListSegment model. */ -@JacksonXmlRootElement(localName = "PageListSegment") @Fluent -public final class PageListSegment { +public final class PageListSegment implements XmlSerializable { /* * The PageRanges property. */ - @JsonProperty("PageRange") private List pageRanges = new ArrayList<>(); /* * The ClearRanges property. */ - @JsonProperty("ClearRange") private List clearRanges = new ArrayList<>(); /* * The NextMarker property. */ - @JsonProperty(value = "NextMarker") private String nextMarker; /** @@ -93,4 +96,78 @@ public PageListSegment setNextMarker(String nextMarker) { this.nextMarker = nextMarker; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageListSegment" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + if (this.pageRanges != null) { + for (PageRange element : this.pageRanges) { + xmlWriter.writeXml(element, "PageRange"); + } + } + if (this.clearRanges != null) { + for (ClearRange element : this.clearRanges) { + xmlWriter.writeXml(element, "ClearRange"); + } + } + xmlWriter.writeStringElement(this.nextMarker, "NextMarker"); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of PageListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of PageListSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the PageListSegment. + */ + public static PageListSegment fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of PageListSegment from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of PageListSegment if the XmlReader was pointing to an instance of it, or null if it + * was pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the PageListSegment. + */ + public static PageListSegment fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "PageListSegment" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + PageListSegment deserializedPageListSegment = new PageListSegment(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + if ("PageRange".equals(elementName.getLocalPart())) { + if (deserializedPageListSegment.pageRanges == null) { + deserializedPageListSegment.pageRanges = new ArrayList<>(); + } + deserializedPageListSegment.pageRanges.add(PageRange.fromXml(reader, "PageRange")); + } else if ("ClearRange".equals(elementName.getLocalPart())) { + if (deserializedPageListSegment.clearRanges == null) { + deserializedPageListSegment.clearRanges = new ArrayList<>(); + } + deserializedPageListSegment.clearRanges.add(ClearRange.fromXml(reader, "ClearRange")); + } else if ("NextMarker".equals(elementName.getLocalPart())) { + deserializedPageListSegment.nextMarker = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + return deserializedPageListSegment; + }); + } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java index af7d8c7764acc..ad8fe1134aeeb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobPrefix.java @@ -5,17 +5,21 @@ package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; +import com.azure.core.util.CoreUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; /** The BlobPrefix model. */ -@JacksonXmlRootElement(localName = "BlobPrefix") @Fluent -public final class BlobPrefix { +public final class BlobPrefix implements XmlSerializable { /* * The Name property. */ - @JsonProperty(value = "Name", required = true) private String name; /** @@ -37,4 +41,59 @@ public BlobPrefix setName(String name) { this.name = name; return this; } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + xmlWriter.writeString(this.name); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of BlobPrefix from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of BlobPrefix if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobPrefix. + */ + public static BlobPrefix fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of BlobPrefix from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @param rootElementName Optional root element name to override the default defined by the model. Used to support + * cases where the model can deserialize from different root element names. + * @return An instance of BlobPrefix if the XmlReader was pointing to an instance of it, or null if it was + * pointing to XML null. + * @throws IllegalStateException If the deserialized XML object was missing any required properties. + * @throws XMLStreamException If an error occurs while reading the BlobPrefix. + */ + public static BlobPrefix fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "BlobPrefix" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + BlobPrefix deserializedBlobPrefix = new BlobPrefix(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + QName elementName = reader.getElementName(); + + if ("Name".equals(elementName.getLocalPart())) { + deserializedBlobPrefix.name = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + + return deserializedBlobPrefix; + }); + } } From b6efa1d9c2e4ffcebfdfbfa4653a91a8f18da338 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 2 Jul 2024 17:13:35 -0700 Subject: [PATCH 15/45] updating lease id after aqcuire and change lease --- .../com/azure/storage/blob/specialized/BlobLeaseClient.java | 4 ++++ .../storage/blob/specialized/BlobLeaseClientBuilder.java | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java index 78cb6b43c56d1..95c2537a009f2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java @@ -214,6 +214,7 @@ public Response acquireLeaseWithResponse(BlobAcquireLeaseOptions options requestConditions.getTagsConditions(), null, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } else { Callable> operation = () -> @@ -222,6 +223,7 @@ public Response acquireLeaseWithResponse(BlobAcquireLeaseOptions options null, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } } @@ -621,6 +623,7 @@ public Response changeLeaseWithResponse(BlobChangeLeaseOptions options, requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } else { Callable> operation = () -> @@ -629,6 +632,7 @@ public Response changeLeaseWithResponse(BlobChangeLeaseOptions options, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); + this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java index cc817f8d08b5f..4a2c112a543ff 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClientBuilder.java @@ -98,7 +98,8 @@ public BlobLeaseClient buildClient() { */ public BlobLeaseAsyncClient buildAsyncClient() { BlobServiceVersion version = (serviceVersion == null) ? BlobServiceVersion.getLatest() : serviceVersion; - return new BlobLeaseAsyncClient(pipeline, url, containerName, blobName, getLeaseId(), isBlob, accountName, version.getVersion()); + return new BlobLeaseAsyncClient(pipeline, url, containerName, blobName, getLeaseId(), isBlob, accountName, + version.getVersion()); } /** From 396e6bdce1276905474bc5fcdf450a97ffcefbe3 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 3 Jul 2024 16:13:21 -0700 Subject: [PATCH 16/45] fix listing apis and versioning apis --- .../storage/blob/BlobContainerClient.java | 12 +++++++++-- .../azure/storage/blob/BlobServiceClient.java | 2 +- .../blob/specialized/BlobAsyncClientBase.java | 20 +------------------ .../blob/specialized/BlobClientBase.java | 17 +++++++++++----- .../blob/specialized/PageBlobClient.java | 10 +++++----- 5 files changed, 29 insertions(+), 32 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 24434870c4f5c..344a1dbd86fe1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1200,11 +1200,15 @@ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsO BiFunction> func = (marker, pageSize) -> { ListBlobsOptions finalOptions; if (pageSize != null) { - finalOptions = options == null ? new ListBlobsOptions().setMaxResultsPerPage(pageSize) : - new ListBlobsOptions() + if (options == null) { + finalOptions = new ListBlobsOptions().setMaxResultsPerPage(pageSize); + } else { + // Note that this prefers the value passed to .byPage(int) over the value on the options + finalOptions = new ListBlobsOptions() .setMaxResultsPerPage(pageSize) .setPrefix(options.getPrefix()) .setDetails(options.getDetails()); + } } else { finalOptions = options; } @@ -1215,6 +1219,10 @@ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsO private PagedResponse listBlobsHierarchySegment(String marker, String delimiter, ListBlobsOptions options, Duration timeout) { + if (options.getDetails().getRetrieveSnapshots()) { + throw LOGGER.logExceptionAsError( + new UnsupportedOperationException("Including snapshots in a hierarchical listing is not supported.")); + } ArrayList include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index db490b2061489..32e59c63c7421 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -445,7 +445,7 @@ public PagedIterable listBlobContainers(ListBlobContainersOpt return listBlobContainersSegment(marker, finalOptions, timeout); }; - return new PagedIterable<>(() -> pageRetriever.apply(null, null), marker -> pageRetriever.apply(marker, null)); + return new PagedIterable<>(pageSize -> pageRetriever.apply(null, pageSize), pageRetriever); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 2564415dab8a6..b4c9dcd8e64f3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -790,25 +790,7 @@ private Mono> onPoll(PollResponse pollR response.getETag(), response.getCopyCompletionTime(), response.getCopyStatusDescription(), response.getVersionId()); - LongRunningOperationStatus operationStatus; - switch (status) { - case SUCCESS: - operationStatus = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED; - break; - case FAILED: - operationStatus = LongRunningOperationStatus.FAILED; - break; - case ABORTED: - operationStatus = LongRunningOperationStatus.USER_CANCELLED; - break; - case PENDING: - operationStatus = LongRunningOperationStatus.IN_PROGRESS; - break; - default: - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "CopyStatusType is not supported. Status: " + status)); - } - + LongRunningOperationStatus operationStatus = ModelHelper.mapStatusToLongRunningOperationStatus(status); return new PollResponse<>(operationStatus, result); }).onErrorReturn( new PollResponse<>(LongRunningOperationStatus.fromString("POLLING_FAILED", true), lastInfo)); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index b0a6df94b76ca..7921596951517 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -822,6 +822,11 @@ public SyncPoller beginCopy(BlobBeginCopyOptions options) { Function, PollResponse> syncActivationOperation = (pollingContext) -> { + try { + new URL(options.getSourceUrl()); + } catch (MalformedURLException ex) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.", ex)); + } ResponseBase response = azureBlobStorage.getBlobs().startCopyFromURLWithResponse(containerName, blobName, options.getSourceUrl(), null, options.getMetadata(), options.getTier(), @@ -838,10 +843,12 @@ public SyncPoller beginCopy(BlobBeginCopyOptions options) { BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); copyId.set(headers.getXMsCopyId()); - return new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, new BlobCopyInfo( - options.getSourceUrl(), headers.getXMsCopyId(), headers.getXMsCopyStatus(), headers.getETag(), - headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()))); - + return new PollResponse<>( + LongRunningOperationStatus.IN_PROGRESS, + new BlobCopyInfo(options.getSourceUrl(), headers.getXMsCopyId(), headers.getXMsCopyStatus(), + headers.getETag(), headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()), + headers.getXMsVersionId()) + ); }; Function, PollResponse> pollOperation = (pollingContext) -> @@ -886,7 +893,7 @@ private PollResponse onPoll(PollResponse pollRespons BlobProperties value = response.getValue(); final CopyStatusType status = value.getCopyStatus(); final BlobCopyInfo result = new BlobCopyInfo(value.getCopySource(), value.getCopyId(), status, - value.getETag(), value.getCopyCompletionTime(), value.getCopyStatusDescription()); + value.getETag(), value.getCopyCompletionTime(), value.getCopyStatusDescription(), value.getVersionId()); LongRunningOperationStatus operationStatus = ModelHelper.mapStatusToLongRunningOperationStatus(status); return new PollResponse<>(operationStatus, result); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index bd1b5d5508db5..8f8fbf682ad91 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -916,10 +916,10 @@ public PagedIterable listPageRanges(ListPageRangesOptions options Context finalContext = context == null ? Context.NONE : context; // Helper function to retrieve a page of items - Function> pageRetriever = continuationToken -> { + BiFunction> pageRetriever = (continuationToken, pageSize) -> { BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions() : options.getRequestConditions(); - Integer pageSize = options.getMaxResultsPerPage(); + Integer finalPageSize = pageSize == null ? options.getMaxResultsPerPage() : pageSize; // Call the synchronous service method Callable> operation = () -> @@ -927,7 +927,7 @@ public PagedIterable listPageRanges(ListPageRangesOptions options null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, continuationToken, pageSize, finalContext); + requestConditions.getTagsConditions(), null, continuationToken, finalPageSize, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -941,8 +941,8 @@ public PagedIterable listPageRanges(ListPageRangesOptions options PageListHelper.getNextMarker(response.getValue()), response.getDeserializedHeaders()); }; - - return new PagedIterable<>(() -> pageRetriever.apply(null), pageRetriever); + return new PagedIterable<>(pageSize -> pageRetriever.apply(null, pageSize), pageRetriever); + //return new PagedIterable<>(() -> pageRetriever.apply(null), pageRetriever); } private List parsePageRangeItems(PageList pageList) { From 0172612c88c9bd1453b09b4f4b49006c6ce7db78 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 9 Jul 2024 11:44:00 -0700 Subject: [PATCH 17/45] fixing listPages and queryWithResponse --- sdk/storage/azure-storage-blob/pom.xml | 2 +- .../implementation/util/BlobQueryReader.java | 103 +++++++++++++++++- .../blob/specialized/BlobClientBase.java | 44 +++++--- .../blob/specialized/PageBlobClient.java | 1 - 4 files changed, 129 insertions(+), 21 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 6d76da226d83d..19357d7ba454d 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -70,7 +70,7 @@ com.azure azure-core - 1.49.1 + 1.50.0-beta.1 com.azure diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index e1212ef99149d..8aa2544107e7a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -3,6 +3,7 @@ package com.azure.storage.blob.implementation.util; +import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.models.ArrowConfiguration; import com.azure.storage.blob.implementation.models.ArrowField; @@ -19,6 +20,7 @@ import com.azure.storage.blob.models.BlobQueryParquetSerialization; import com.azure.storage.blob.models.BlobQueryProgress; import com.azure.storage.blob.models.BlobQuerySerialization; +import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.internal.avro.implementation.AvroConstants; import com.azure.storage.internal.avro.implementation.AvroObject; import com.azure.storage.internal.avro.implementation.AvroReaderFactory; @@ -28,8 +30,13 @@ import reactor.core.publisher.Mono; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PipedInputStream; +import java.io.PipedOutputStream; import java.nio.ByteBuffer; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Consumer; @@ -41,7 +48,8 @@ */ public class BlobQueryReader { - private final Flux avro; + private final Flux avroFlux; + private final InputStream avroInputStream; private final Consumer progressConsumer; private final Consumer errorConsumer; @@ -54,7 +62,24 @@ public class BlobQueryReader { */ public BlobQueryReader(Flux avro, Consumer progressConsumer, Consumer errorConsumer) { - this.avro = avro; + this.avroFlux = avro; + this.progressConsumer = progressConsumer; + this.errorConsumer = errorConsumer; + this.avroInputStream = null; + } + + /** + * Creates a new BlobQueryReader. + * + * @param inputStream the {@link InputStream} containing the Avro data. + * @param progressConsumer The progress consumer. + * @param errorConsumer The error consumer. + */ + public BlobQueryReader(InputStream inputStream, Consumer progressConsumer, + Consumer errorConsumer) { + StorageImplUtils.assertNotNull("inputStream", inputStream); + this.avroInputStream = inputStream; + this.avroFlux = null; this.progressConsumer = progressConsumer; this.errorConsumer = errorConsumer; } @@ -69,11 +94,83 @@ public BlobQueryReader(Flux avro, Consumer progre * @return The parsed query reactive stream. */ public Flux read() { - return new AvroReaderFactory().getAvroReader(avro).read() + return new AvroReaderFactory().getAvroReader(avroFlux).read() .map(AvroObject::getObject) .concatMap(this::parseRecord); } + /** + * Avro parses a query reactive stream. + * + * The Avro stream is formatted as the Avro Header (that specifies the schema) and the Avro Body (that contains + * a series of blocks of data). The Query Avro schema indicates that the objects being emitted from the parser can + * either be a result data record, an end record, a progress record or an error record. + * + * @return The parsed query reactive stream. + */ + public InputStream readInputStream(InputStream inputStream) throws IOException { + // Convert InputStream to Flux + Flux avroFlux = toFluxByteBuffer(inputStream); + + // Use existing read method to process the data + Flux processedData = new AvroReaderFactory().getAvroReader(avroFlux).read() + .map(AvroObject::getObject) + .concatMap(this::parseRecord); + + // Convert back to InputStream + return convertToInputStream(processedData); + } + + private Flux toFluxByteBuffer(InputStream inputStream) { + // Convert InputStream to Flux, consider buffering if necessary + return FluxUtil.toFluxByteBuffer(inputStream); + } + + private InputStream convertToInputStream(Flux flux) throws IOException { + PipedOutputStream outStream = new PipedOutputStream(); + PipedInputStream inStream = new PipedInputStream(outStream); + + // Handle stream conversion in a separate thread + Thread thread = new Thread(() -> { + try { + flux.subscribe( + byteBuffer -> { + try { + byte[] array = byteBuffer.array(); + outStream.write(array, byteBuffer.position(), byteBuffer.remaining()); + } catch (IOException e) { + throw new RuntimeException(e); + } + }, + error -> { + try { + outStream.close(); + } catch (IOException e) { + // Handle error closing stream + } + }, + () -> { + try { + outStream.close(); + } catch (IOException e) { + // Handle error closing stream + } + } + ); + } catch (Exception e) { + try { + outStream.close(); + } catch (IOException ex) { + // Handle error closing stream + } + } + }); + thread.start(); + + return inStream; + } + + /** * Parses a query record. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 7921596951517..7fe9bac4af091 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -2497,9 +2497,15 @@ containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, qr, getCustomerProvidedKey(), Context.NONE); - InputStream inputStream = response.getValue(); - - return new SimpleResponse<>(response, inputStream); + InputStream avroInputStream = response.getValue(); + BlobQueryReader reader = new BlobQueryReader(avroInputStream, queryOptions.getProgressConsumer(), + queryOptions.getErrorConsumer()); + try { + InputStream resultStream = reader.readInputStream(avroInputStream); + return new SimpleResponse<>(response, resultStream); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); + } } /** @@ -2598,22 +2604,28 @@ public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Durati try { ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - InputStream inputStream = response.getValue(); - OutputStream outputStream = queryOptions.getOutputStream(); - byte[] buffer = new byte[4096]; - int bytesRead; - while ((bytesRead = inputStream.read(buffer)) != -1) { - outputStream.write(buffer, 0, bytesRead); - } + InputStream avroInputStream = response.getValue(); + BlobQueryReader reader = new BlobQueryReader(avroInputStream, queryOptions.getProgressConsumer(), + queryOptions.getErrorConsumer()); + + InputStream resultStream = reader.readInputStream(avroInputStream); + OutputStream outputStream = queryOptions.getOutputStream(); + + byte[] buffer = new byte[4096]; + int bytesRead; + while ((bytesRead = resultStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + + BlobQueryAsyncResponse asyncResponse = new BlobQueryAsyncResponse(response.getRequest(), + response.getStatusCode(), response.getHeaders(), + /* Parse the avro reactive stream. */ + null, + ModelHelper.transformQueryHeaders(response.getDeserializedHeaders(), response.getHeaders())); - BlobQueryAsyncResponse asyncResponse = new BlobQueryAsyncResponse(response.getRequest(), - response.getStatusCode(), response.getHeaders(), - /* Parse the avro reactive stream. */ - new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()).read(), - ModelHelper.transformQueryHeaders(response.getDeserializedHeaders(), response.getHeaders())); + return new BlobQueryResponse(asyncResponse); - return new BlobQueryResponse(asyncResponse); } catch (IOException e) { throw new UncheckedIOException("Failed to read query results or write to the output stream", e); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 8f8fbf682ad91..50e62c422f599 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -942,7 +942,6 @@ public PagedIterable listPageRanges(ListPageRangesOptions options response.getDeserializedHeaders()); }; return new PagedIterable<>(pageSize -> pageRetriever.apply(null, pageSize), pageRetriever); - //return new PagedIterable<>(() -> pageRetriever.apply(null), pageRetriever); } private List parsePageRangeItems(PageList pageList) { From db6159a251c3647ee5002b7f1c64abba4ddcfe28 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 9 Jul 2024 15:48:38 -0700 Subject: [PATCH 18/45] fixed queryWithResponse and queryInputStream tests --- .../com/azure/storage/blob/BlobClient.java | 3 + .../storage/blob/BlobContainerClient.java | 4 +- .../azure/storage/blob/BlobServiceClient.java | 7 -- .../implementation/util/BlobQueryReader.java | 78 ++----------------- .../blob/specialized/AppendBlobClient.java | 10 --- .../blob/specialized/BlobClientBase.java | 5 +- .../blob/specialized/BlobLeaseClient.java | 2 - .../blob/specialized/PageBlobClient.java | 2 - 8 files changed, 12 insertions(+), 99 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index 03818a272f65b..fef680a6ad4bb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -104,6 +104,7 @@ protected BlobClient(BlobAsyncClient client) { /** * Protected constructor for use by {@link BlobClientBuilder}. * + * @param client the async blob client * @param pipeline The pipeline used to send and receive service requests. * @param url The endpoint where to send service requests. * @param serviceVersion The version of the service to receive requests. @@ -123,6 +124,7 @@ protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, /** * Protected constructor for use by {@link BlobClientBuilder}. * + * @param client the async blob client * @param pipeline The pipeline used to send and receive service requests. * @param url The endpoint where to send service requests. * @param serviceVersion The version of the service to receive requests. @@ -145,6 +147,7 @@ protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, /** * Protected constructor for use by {@link BlobClientBuilder}. * + * @param client the async blob client * @param pipeline The pipeline used to send and receive service requests. * @param url The endpoint where to send service requests. * @param serviceVersion The version of the service to receive requests. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 344a1dbd86fe1..1ebc357493586 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -58,7 +58,6 @@ import com.azure.storage.common.StorageSharedKeyCredential; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; -import reactor.core.publisher.Mono; import java.net.URI; import java.time.Duration; @@ -75,7 +74,6 @@ import java.util.function.Supplier; import java.util.stream.Collectors; -import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** @@ -1210,7 +1208,7 @@ public PagedIterable listBlobsByHierarchy(String delimiter, ListBlobsO .setDetails(options.getDetails()); } } else { - finalOptions = options; + finalOptions = options == null ? new ListBlobsOptions() : options; } return listBlobsHierarchySegment(marker, delimiter, finalOptions, timeout); }; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 32e59c63c7421..353811d80b781 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -8,7 +8,6 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; @@ -20,9 +19,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; -import com.azure.storage.blob.implementation.models.BlobContainersSegment; -import com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders; -import com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders; import com.azure.storage.blob.implementation.models.ContainersRestoreHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.FilterBlobSegment; @@ -35,7 +31,6 @@ import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerItem; import com.azure.storage.blob.models.BlobCorsRule; -import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobServiceProperties; import com.azure.storage.blob.models.BlobServiceStatistics; import com.azure.storage.blob.models.BlobStorageException; @@ -56,7 +51,6 @@ import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import com.azure.storage.common.sas.AccountSasSignatureValues; -import reactor.core.publisher.Mono; import java.net.URI; import java.time.Duration; @@ -67,7 +61,6 @@ import java.util.Map; import java.util.concurrent.Callable; import java.util.function.BiFunction; -import java.util.function.Supplier; import java.util.stream.Collectors; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index 8aa2544107e7a..cc9c030ba02f8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -20,7 +20,7 @@ import com.azure.storage.blob.models.BlobQueryParquetSerialization; import com.azure.storage.blob.models.BlobQueryProgress; import com.azure.storage.blob.models.BlobQuerySerialization; -import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.storage.common.implementation.FluxInputStream; import com.azure.storage.internal.avro.implementation.AvroConstants; import com.azure.storage.internal.avro.implementation.AvroObject; import com.azure.storage.internal.avro.implementation.AvroReaderFactory; @@ -31,12 +31,8 @@ import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; -import java.io.PipedInputStream; -import java.io.PipedOutputStream; import java.nio.ByteBuffer; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Consumer; @@ -48,8 +44,7 @@ */ public class BlobQueryReader { - private final Flux avroFlux; - private final InputStream avroInputStream; + private final Flux avro; private final Consumer progressConsumer; private final Consumer errorConsumer; @@ -62,24 +57,7 @@ public class BlobQueryReader { */ public BlobQueryReader(Flux avro, Consumer progressConsumer, Consumer errorConsumer) { - this.avroFlux = avro; - this.progressConsumer = progressConsumer; - this.errorConsumer = errorConsumer; - this.avroInputStream = null; - } - - /** - * Creates a new BlobQueryReader. - * - * @param inputStream the {@link InputStream} containing the Avro data. - * @param progressConsumer The progress consumer. - * @param errorConsumer The error consumer. - */ - public BlobQueryReader(InputStream inputStream, Consumer progressConsumer, - Consumer errorConsumer) { - StorageImplUtils.assertNotNull("inputStream", inputStream); - this.avroInputStream = inputStream; - this.avroFlux = null; + this.avro = avro; this.progressConsumer = progressConsumer; this.errorConsumer = errorConsumer; } @@ -94,7 +72,7 @@ public BlobQueryReader(InputStream inputStream, Consumer prog * @return The parsed query reactive stream. */ public Flux read() { - return new AvroReaderFactory().getAvroReader(avroFlux).read() + return new AvroReaderFactory().getAvroReader(avro).read() .map(AvroObject::getObject) .concatMap(this::parseRecord); } @@ -117,8 +95,7 @@ public InputStream readInputStream(InputStream inputStream) throws IOException { .map(AvroObject::getObject) .concatMap(this::parseRecord); - // Convert back to InputStream - return convertToInputStream(processedData); + return new FluxInputStream(processedData); } private Flux toFluxByteBuffer(InputStream inputStream) { @@ -126,51 +103,6 @@ private Flux toFluxByteBuffer(InputStream inputStream) { return FluxUtil.toFluxByteBuffer(inputStream); } - private InputStream convertToInputStream(Flux flux) throws IOException { - PipedOutputStream outStream = new PipedOutputStream(); - PipedInputStream inStream = new PipedInputStream(outStream); - - // Handle stream conversion in a separate thread - Thread thread = new Thread(() -> { - try { - flux.subscribe( - byteBuffer -> { - try { - byte[] array = byteBuffer.array(); - outStream.write(array, byteBuffer.position(), byteBuffer.remaining()); - } catch (IOException e) { - throw new RuntimeException(e); - } - }, - error -> { - try { - outStream.close(); - } catch (IOException e) { - // Handle error closing stream - } - }, - () -> { - try { - outStream.close(); - } catch (IOException e) { - // Handle error closing stream - } - } - ); - } catch (Exception e) { - try { - outStream.close(); - } catch (IOException ex) { - // Handle error closing stream - } - } - }); - thread.start(); - - return inStream; - } - - /** * Parses a query record. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 803c5d4a73724..4b8f6075da102 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -12,7 +12,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; @@ -20,7 +19,6 @@ import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.BlobServiceClient; import com.azure.storage.blob.BlobServiceVersion; -import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.util.ModelHelper; @@ -43,21 +41,13 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import java.io.IOException; import java.io.InputStream; -import java.net.HttpURLConnection; import java.nio.ByteBuffer; import java.time.Duration; -import java.util.Arrays; import java.util.Map; import java.util.Objects; import java.util.concurrent.Callable; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 7fe9bac4af091..f7b0843e7994d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -190,6 +190,7 @@ protected BlobClientBase(BlobAsyncClientBase client) { /** * Protected constructor for use by {@link SpecializedBlobClientBuilder}. * + * @param client the async blob client * @param pipeline The pipeline used to send and receive service requests. * @param url The endpoint where to send service requests. * @param serviceVersion The version of the service to receive requests. @@ -2498,7 +2499,7 @@ containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, qr, getCustomerProvidedKey(), Context.NONE); InputStream avroInputStream = response.getValue(); - BlobQueryReader reader = new BlobQueryReader(avroInputStream, queryOptions.getProgressConsumer(), + BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); try { InputStream resultStream = reader.readInputStream(avroInputStream); @@ -2606,7 +2607,7 @@ public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Durati BlobStorageException.class); InputStream avroInputStream = response.getValue(); - BlobQueryReader reader = new BlobQueryReader(avroInputStream, queryOptions.getProgressConsumer(), + BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); InputStream resultStream = reader.readInputStream(avroInputStream); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java index 95c2537a009f2..1e0db813c3fd4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java @@ -12,7 +12,6 @@ import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobClient; import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; @@ -34,7 +33,6 @@ import com.azure.storage.blob.options.BlobReleaseLeaseOptions; import com.azure.storage.blob.options.BlobRenewLeaseOptions; import com.azure.storage.common.implementation.StorageImplUtils; -import reactor.core.publisher.Mono; import java.net.URL; import java.time.Duration; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index 50e62c422f599..c339b21ad7a53 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -11,7 +11,6 @@ import com.azure.core.http.HttpRange; import com.azure.core.http.HttpResponse; import com.azure.core.http.RequestConditions; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; @@ -72,7 +71,6 @@ import java.util.Objects; import java.util.concurrent.Callable; import java.util.function.BiFunction; -import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; From afe670bed25a655334f542486818670a0d55e1fd Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 25 Jul 2024 11:49:42 -0700 Subject: [PATCH 19/45] fixing comments from PR --- .../storage/blob/BlobContainerClient.java | 2 +- .../azure/storage/blob/BlobServiceClient.java | 17 +++++++------- .../implementation/util/BlobQueryReader.java | 7 +----- .../blob/implementation/util/ModelHelper.java | 5 +++-- .../blob/specialized/BlobClientBase.java | 22 +++++++++++++++++++ .../src/main/java/module-info.java | 1 + 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 1ebc357493586..ab9973c0f4e44 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -105,7 +105,7 @@ public final class BlobContainerClient { /** * Special container name for the logs container in the Storage account. */ - public static final String LOG_CONTAINER_NAME = "$logs"; + public static final String LOG_CONTAINER_NAME = BlobContainerAsyncClient.LOG_CONTAINER_NAME; private static final ClientLogger LOGGER = new ClientLogger(BlobContainerClient.class); private final AzureBlobStorageImpl azureBlobStorage; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 353811d80b781..ffa0271e6dfef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -30,6 +30,7 @@ import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerItem; +import com.azure.storage.blob.models.BlobContainerListDetails; import com.azure.storage.blob.models.BlobCorsRule; import com.azure.storage.blob.models.BlobServiceProperties; import com.azure.storage.blob.models.BlobServiceStatistics; @@ -431,23 +432,21 @@ public PagedIterable listBlobContainers(ListBlobContainersOpt throwOnAnonymousAccess(); BiFunction> pageRetriever = (marker, pageSize) -> { ListBlobContainersOptions finalOptions = options != null ? options : new ListBlobContainersOptions(); - - if (pageSize != null) { - finalOptions.setMaxResultsPerPage(pageSize); - } - - return listBlobContainersSegment(marker, finalOptions, timeout); + Integer finalPageSize = pageSize != null ? pageSize : finalOptions.getMaxResultsPerPage(); + return listBlobContainersSegment(marker, finalOptions.getDetails(), finalOptions.getPrefix(), finalPageSize, + timeout); }; return new PagedIterable<>(pageSize -> pageRetriever.apply(null, pageSize), pageRetriever); } - private PagedResponse listBlobContainersSegment(String marker, ListBlobContainersOptions options, Duration timeout) { + private PagedResponse listBlobContainersSegment(String marker, BlobContainerListDetails details, + String prefix, Integer maxResultsPerPage, Duration timeout) { // Set up the include types based on the details provided in the options - List include = ModelHelper.toIncludeTypes(options.getDetails()); + List include = ModelHelper.toIncludeTypes(details); Callable> operation = () -> this.azureBlobStorage.getServices() - .listBlobContainersSegmentSinglePage(options.getPrefix(), marker, options.getMaxResultsPerPage(), include, + .listBlobContainersSegmentSinglePage(prefix, marker, maxResultsPerPage, include, null, null, Context.NONE); return sendRequest(operation, timeout, BlobStorageException.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index cc9c030ba02f8..7dc04919ae7c4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -88,7 +88,7 @@ public Flux read() { */ public InputStream readInputStream(InputStream inputStream) throws IOException { // Convert InputStream to Flux - Flux avroFlux = toFluxByteBuffer(inputStream); + Flux avroFlux = FluxUtil.toFluxByteBuffer(inputStream); // Use existing read method to process the data Flux processedData = new AvroReaderFactory().getAvroReader(avroFlux).read() @@ -98,11 +98,6 @@ public InputStream readInputStream(InputStream inputStream) throws IOException { return new FluxInputStream(processedData); } - private Flux toFluxByteBuffer(InputStream inputStream) { - // Convert InputStream to Flux, consider buffering if necessary - return FluxUtil.toFluxByteBuffer(inputStream); - } - /** * Parses a query record. * diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index ff4f7e44a9953..b9dfad111e6cb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -57,6 +57,7 @@ import java.net.URL; import java.net.URLEncoder; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; @@ -530,9 +531,9 @@ public static String tagsToString(Map tags) { StringBuilder sb = new StringBuilder(); for (Map.Entry entry : tags.entrySet()) { try { - sb.append(URLEncoder.encode(entry.getKey(), Charset.defaultCharset().toString())); + sb.append(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8.toString())); sb.append("="); - sb.append(URLEncoder.encode(entry.getValue(), Charset.defaultCharset().toString())); + sb.append(URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString())); sb.append("&"); } catch (UnsupportedEncodingException e) { throw LOGGER.logExceptionAsError(new IllegalStateException(e)); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 421648abdeb59..8e4a0919c7350 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -25,6 +25,28 @@ import com.azure.storage.blob.BlobContainerClientBuilder; import com.azure.storage.blob.BlobServiceClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; +import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; +import com.azure.storage.blob.implementation.models.BlobPropertiesInternalGetProperties; +import com.azure.storage.blob.implementation.models.BlobTag; +import com.azure.storage.blob.implementation.models.BlobTags; +import com.azure.storage.blob.implementation.models.BlobsCopyFromURLHeaders; +import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders; +import com.azure.storage.blob.implementation.models.BlobsQueryHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders; +import com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders; +import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.models.InternalBlobLegalHoldResult; +import com.azure.storage.blob.implementation.models.QueryRequest; +import com.azure.storage.blob.implementation.models.QuerySerialization; +import com.azure.storage.blob.implementation.util.BlobQueryReader; +import com.azure.storage.blob.implementation.util.BlobRequestConditionProperty; +import com.azure.storage.blob.implementation.util.BlobSasImplUtil; import com.azure.storage.blob.implementation.util.ByteBufferBackedOutputStreamUtil; import com.azure.storage.blob.implementation.util.ChunkedDownloadUtils; import com.azure.storage.blob.implementation.util.ModelHelper; diff --git a/sdk/storage/azure-storage-blob/src/main/java/module-info.java b/sdk/storage/azure-storage-blob/src/main/java/module-info.java index 4440b9bcbfb7e..c5bae00754af7 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/module-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/module-info.java @@ -5,6 +5,7 @@ requires transitive com.azure.storage.common; requires com.azure.storage.internal.avro; + requires com.azure.core; exports com.azure.storage.blob; exports com.azure.storage.blob.models; From 09ee10d218db305282a882d5c7e66659323be744 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 25 Jul 2024 16:01:46 -0700 Subject: [PATCH 20/45] addressing more comments, fixing analyze issues --- .../blob/BlobContainerAsyncClient.java | 21 +--- .../storage/blob/BlobContainerClient.java | 29 +---- .../storage/blob/BlobServiceAsyncClient.java | 3 - .../implementation/util/BlobQueryReader.java | 2 + .../blob/implementation/util/ModelHelper.java | 34 +++++- .../blob/specialized/BlobAsyncClientBase.java | 3 - .../blob/specialized/BlobClientBase.java | 106 +++++++++--------- .../blob/specialized/PageBlobClient.java | 14 ++- 8 files changed, 98 insertions(+), 114 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 5daf56ab53d09..e95768e5ade69 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -980,29 +980,12 @@ Mono> setAccessPolicyWithResponse(PublicAccessType accessType, new UnsupportedOperationException("ETag access conditions are not supported for this API.")); } - /* - We truncate to seconds because the service only supports nanoseconds or seconds, but doing an - OffsetDateTime.now will only give back milliseconds (more precise fields are zeroed and not serialized). This - allows for proper serialization with no real detriment to users as sub-second precision on active time for - signed identifiers is not really necessary. - */ - if (identifiers != null) { - for (BlobSignedIdentifier identifier : identifiers) { - if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getStartsOn() != null) { - identifier.getAccessPolicy().setStartsOn( - identifier.getAccessPolicy().getStartsOn().truncatedTo(ChronoUnit.SECONDS)); - } - if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getExpiresOn() != null) { - identifier.getAccessPolicy().setExpiresOn( - identifier.getAccessPolicy().getExpiresOn().truncatedTo(ChronoUnit.SECONDS)); - } - } - } + List finalIdentifiers = ModelHelper.truncateTimeForBlobSignedIdentifier(identifiers); context = context == null ? Context.NONE : context; return this.azureBlobStorage.getContainers().setAccessPolicyNoCustomHeadersWithResponseAsync(containerName, null, requestConditions.getLeaseId(), accessType, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), null, identifiers, context); + requestConditions.getIfUnmodifiedSince(), null, finalIdentifiers, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index ab9973c0f4e44..f969d4e79672d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -62,7 +62,6 @@ import java.net.URI; import java.time.Duration; import java.time.OffsetDateTime; -import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -141,7 +140,7 @@ public final class BlobContainerClient { * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass * {@code null} to allow the service to use its own encryption. */ - BlobContainerClient( HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, + BlobContainerClient(HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, String accountName, String containerName, CpkInfo customerProvidedKey, EncryptionScope encryptionScope, BlobContainerEncryptionScope blobContainerEncryptionScope) { this.azureBlobStorage = new AzureBlobStorageImplBuilder() @@ -932,30 +931,12 @@ public Response setAccessPolicyWithResponse(PublicAccessType accessType, throw LOGGER.logExceptionAsError( new UnsupportedOperationException("ETag access conditions are not supported for this API.")); } - - /* - We truncate to seconds because the service only supports nanoseconds or seconds, but doing an - OffsetDateTime.now will only give back milliseconds (more precise fields are zeroed and not serialized). This - allows for proper serialization with no real detriment to users as sub-second precision on active time for - signed identifiers is not really necessary. - */ - if (identifiers != null) { - for (BlobSignedIdentifier identifier : identifiers) { - if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getStartsOn() != null) { - identifier.getAccessPolicy().setStartsOn( - identifier.getAccessPolicy().getStartsOn().truncatedTo(ChronoUnit.SECONDS)); - } - if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getExpiresOn() != null) { - identifier.getAccessPolicy().setExpiresOn( - identifier.getAccessPolicy().getExpiresOn().truncatedTo(ChronoUnit.SECONDS)); - } - } - } + List finalIdentifiers = ModelHelper.truncateTimeForBlobSignedIdentifier(identifiers); Context finalContext = context == null ? Context.NONE : context; Callable> operation = () -> this.azureBlobStorage.getContainers() .setAccessPolicyNoCustomHeadersWithResponse(containerName, null, finalRequestConditions.getLeaseId(), accessType, finalRequestConditions.getIfModifiedSince(), - finalRequestConditions.getIfUnmodifiedSince(), null, identifiers, finalContext); + finalRequestConditions.getIfUnmodifiedSince(), null, finalIdentifiers, finalContext); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1080,8 +1061,8 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin containerName, finalOptions.getPrefix(), nextMarker, finalOptions.getMaxResultsPerPage(), include, null, null, Context.NONE); - List value = response.getValue().getSegment() == null ? Collections.emptyList() : - response.getValue().getSegment().getBlobItems().stream() + List value = response.getValue().getSegment() == null ? Collections.emptyList() + : response.getValue().getSegment().getBlobItems().stream() .map(ModelHelper::populateBlobItem) .collect(Collectors.toList()); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index f9f5fb03e68ab..cbd5ee299ee25 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -25,15 +25,12 @@ import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerItem; -import com.azure.storage.blob.models.BlobContainerListDetails; import com.azure.storage.blob.models.BlobCorsRule; -import com.azure.storage.blob.models.BlobRetentionPolicy; import com.azure.storage.blob.models.BlobServiceProperties; import com.azure.storage.blob.models.BlobServiceStatistics; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.KeyInfo; -import com.azure.storage.blob.models.ListBlobContainersIncludeType; import com.azure.storage.blob.models.ListBlobContainersOptions; import com.azure.storage.blob.models.PublicAccessType; import com.azure.storage.blob.models.StorageAccountInfo; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index 7dc04919ae7c4..8ffcadd0c1f81 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -84,7 +84,9 @@ public Flux read() { * a series of blocks of data). The Query Avro schema indicates that the objects being emitted from the parser can * either be a result data record, an end record, a progress record or an error record. * + * @param inputStream The input stream to read from. * @return The parsed query reactive stream. + * @throws IOException If an I/O error occurs. */ public InputStream readInputStream(InputStream inputStream) throws IOException { // Convert InputStream to Flux diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index b9dfad111e6cb..b82cb5d4cab65 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -38,6 +38,7 @@ import com.azure.storage.blob.models.BlobQueryHeaders; import com.azure.storage.blob.models.BlobRequestConditions; import com.azure.storage.blob.models.BlobRetentionPolicy; +import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.ListBlobContainersIncludeType; @@ -58,6 +59,7 @@ import java.net.URLEncoder; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; @@ -529,18 +531,21 @@ public static String tagsToString(Map tags) { return null; } StringBuilder sb = new StringBuilder(); + boolean first = true; // Flag to track if it's the first element in the loop for (Map.Entry entry : tags.entrySet()) { try { + if (!first) { + sb.append("&"); // Append the delimiter before the key-value pair, except for the first + } else { + first = false; // Update flag after processing the first entry + } sb.append(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8.toString())); sb.append("="); sb.append(URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString())); - sb.append("&"); } catch (UnsupportedEncodingException e) { throw LOGGER.logExceptionAsError(new IllegalStateException(e)); } } - - sb.deleteCharAt(sb.length() - 1); // Remove the last '&' return sb.toString(); } @@ -651,6 +656,29 @@ public static String pageRangeToString(PageRange pageRange) { return "bytes=" + pageRange.getStart() + '-' + pageRange.getEnd(); } + public static List truncateTimeForBlobSignedIdentifier(List identifiers) { + if (identifiers == null) { + return null; + } + /* + We truncate to seconds because the service only supports nanoseconds or seconds, but doing an + OffsetDateTime.now will only give back milliseconds (more precise fields are zeroed and not serialized). This + allows for proper serialization with no real detriment to users as sub-second precision on active time for + signed identifiers is not really necessary. + */ + for (BlobSignedIdentifier identifier : identifiers) { + if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getStartsOn() != null) { + identifier.getAccessPolicy().setStartsOn( + identifier.getAccessPolicy().getStartsOn().truncatedTo(ChronoUnit.SECONDS)); + } + if (identifier.getAccessPolicy() != null && identifier.getAccessPolicy().getExpiresOn() != null) { + identifier.getAccessPolicy().setExpiresOn( + identifier.getAccessPolicy().getExpiresOn().truncatedTo(ChronoUnit.SECONDS)); + } + } + return identifiers; + } + private ModelHelper() { } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 457a404ce6432..107bcfc3b5c99 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -89,14 +89,11 @@ import java.io.IOException; import java.io.UncheckedIOException; -import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; -import java.net.URLEncoder; import java.nio.ByteBuffer; import java.nio.channels.AsynchronousFileChannel; -import java.nio.charset.Charset; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; import java.nio.file.OpenOption; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 8e4a0919c7350..4c4c2f3a73f7a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -821,35 +821,35 @@ public SyncPoller beginCopy(BlobBeginCopyOptions options) { final BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); - Function, PollResponse> syncActivationOperation = - (pollingContext) -> { - try { - new URL(options.getSourceUrl()); - } catch (MalformedURLException ex) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.", ex)); - } - ResponseBase response = - azureBlobStorage.getBlobs().startCopyFromURLWithResponse(containerName, blobName, - options.getSourceUrl(), null, options.getMetadata(), options.getTier(), - options.getRehydratePriority(), sourceModifiedConditions.getIfModifiedSince(), - sourceModifiedConditions.getIfUnmodifiedSince(), sourceModifiedConditions.getIfMatch(), - sourceModifiedConditions.getIfNoneMatch(), sourceModifiedConditions.getTagsConditions(), - destinationRequestConditions.getIfModifiedSince(), - destinationRequestConditions.getIfUnmodifiedSince(), destinationRequestConditions.getIfMatch(), - destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getTagsConditions(), - destinationRequestConditions.getLeaseId(), null, ModelHelper.tagsToString(options.getTags()), - options.isSealDestination(), immutabilityPolicy.getExpiryTime(), - immutabilityPolicy.getPolicyMode(), options.isLegalHold(), Context.NONE); - - BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); - copyId.set(headers.getXMsCopyId()); - - return new PollResponse<>( - LongRunningOperationStatus.IN_PROGRESS, - new BlobCopyInfo(options.getSourceUrl(), headers.getXMsCopyId(), headers.getXMsCopyStatus(), - headers.getETag(), headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()), - headers.getXMsVersionId()) - ); + Function, PollResponse> syncActivationOperation = (pollingContext) -> + { + try { + new URL(options.getSourceUrl()); + } catch (MalformedURLException ex) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.", ex)); + } + ResponseBase response = + azureBlobStorage.getBlobs().startCopyFromURLWithResponse(containerName, blobName, + options.getSourceUrl(), null, options.getMetadata(), options.getTier(), + options.getRehydratePriority(), sourceModifiedConditions.getIfModifiedSince(), + sourceModifiedConditions.getIfUnmodifiedSince(), sourceModifiedConditions.getIfMatch(), + sourceModifiedConditions.getIfNoneMatch(), sourceModifiedConditions.getTagsConditions(), + destinationRequestConditions.getIfModifiedSince(), + destinationRequestConditions.getIfUnmodifiedSince(), destinationRequestConditions.getIfMatch(), + destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getTagsConditions(), + destinationRequestConditions.getLeaseId(), null, ModelHelper.tagsToString(options.getTags()), + options.isSealDestination(), immutabilityPolicy.getExpiryTime(), + immutabilityPolicy.getPolicyMode(), options.isLegalHold(), Context.NONE); + + BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); + copyId.set(headers.getXMsCopyId()); + + return new PollResponse<>( + LongRunningOperationStatus.IN_PROGRESS, + new BlobCopyInfo(options.getSourceUrl(), headers.getXMsCopyId(), headers.getXMsCopyStatus(), + headers.getETag(), headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()), + headers.getXMsVersionId()) + ); }; Function, PollResponse> pollOperation = (pollingContext) -> @@ -2480,7 +2480,6 @@ public InputStream openQueryInputStream(String expression) { @ServiceMethod(returns = ReturnType.SINGLE) public Response openQueryInputStreamWithResponse(BlobQueryOptions queryOptions) { StorageImplUtils.assertNotNull("options", queryOptions); - //StorageImplUtils.assertNotNull("outputStream", queryOptions.getOutputStream()); BlobRequestConditions requestConditions = queryOptions.getRequestConditions() == null ? new BlobRequestConditions() : queryOptions.getRequestConditions(); QuerySerialization in = BlobQueryReader.transformInputSerialization(queryOptions.getInputSerialization(), @@ -2596,40 +2595,35 @@ public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Durati .setInputSerialization(in) .setOutputSerialization(out); - Callable> operation = () -> - this.azureBlobStorage.getBlobs().queryWithResponse(containerName, blobName, getSnapshotId(), null, - requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, qr, - getCustomerProvidedKey(), finalContext); - try { - ResponseBase response = sendRequest(operation, timeout, - BlobStorageException.class); + Callable> operation = () -> { + ResponseBase response = this.azureBlobStorage.getBlobs() + .queryWithResponse(containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), + null, qr, getCustomerProvidedKey(), finalContext); InputStream avroInputStream = response.getValue(); BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); + InputStream resultStream = reader.readInputStream(avroInputStream); + OutputStream outputStream = queryOptions.getOutputStream(); + byte[] buffer = new byte[4096]; + int bytesRead; + while ((bytesRead = resultStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } - InputStream resultStream = reader.readInputStream(avroInputStream); - OutputStream outputStream = queryOptions.getOutputStream(); - - byte[] buffer = new byte[4096]; - int bytesRead; - while ((bytesRead = resultStream.read(buffer)) != -1) { - outputStream.write(buffer, 0, bytesRead); - } + return response; + }; - BlobQueryAsyncResponse asyncResponse = new BlobQueryAsyncResponse(response.getRequest(), - response.getStatusCode(), response.getHeaders(), - /* Parse the avro reactive stream. */ - null, - ModelHelper.transformQueryHeaders(response.getDeserializedHeaders(), response.getHeaders())); + ResponseBase response = sendRequest(operation, timeout, + BlobStorageException.class); - return new BlobQueryResponse(asyncResponse); + BlobQueryAsyncResponse asyncResponse = new BlobQueryAsyncResponse(response.getRequest(), + response.getStatusCode(), response.getHeaders(), null, + ModelHelper.transformQueryHeaders(response.getDeserializedHeaders(), response.getHeaders())); - } catch (IOException e) { - throw new UncheckedIOException("Failed to read query results or write to the output stream", e); - } + return new BlobQueryResponse(asyncResponse); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index c339b21ad7a53..bc336620695a1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -764,11 +764,11 @@ public Response clearPagesWithResponse(PageRange pageRange, getCustomerProvidedKey(), encryptionScope, finalContext); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - PageBlobsClearPagesHeaders hd = response.getDeserializedHeaders(); - PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), - hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), null, - hd.getXMsBlobSequenceNumber()); - return new SimpleResponse<>(response, item); + PageBlobsClearPagesHeaders hd = response.getDeserializedHeaders(); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), + hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), null, + hd.getXMsBlobSequenceNumber()); + return new SimpleResponse<>(response, item); } /** @@ -943,7 +943,9 @@ public PagedIterable listPageRanges(ListPageRangesOptions options } private List parsePageRangeItems(PageList pageList) { - if (pageList == null) return Collections.emptyList(); + if (pageList == null) { + return Collections.emptyList(); + } return Stream.concat( pageList.getPageRange().stream().map(this::toPageBlobRange), pageList.getClearRange().stream().map(this::toPageBlobRange) From aa14bf2fe39cc6b10f36ce911bc631230da23b69 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 25 Jul 2024 18:32:55 -0700 Subject: [PATCH 21/45] adding stylecheck fixes --- .../blob/BlobContainerAsyncClient.java | 1 - .../storage/blob/BlobContainerClient.java | 4 +- .../storage/blob/BlobServiceAsyncClient.java | 10 ++--- .../azure/storage/blob/BlobServiceClient.java | 14 +++---- .../blob/implementation/util/ModelHelper.java | 1 - .../blob/specialized/BlobClientBase.java | 39 +++++++++++++------ 6 files changed, 38 insertions(+), 31 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index e95768e5ade69..8a395edae45b2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -56,7 +56,6 @@ import java.net.URI; import java.time.Duration; import java.time.OffsetDateTime; -import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index f969d4e79672d..cb4abcb7bfc2d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -1293,9 +1293,7 @@ private PagedResponse findBlobsByTagsHelper( ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); - List value = response.getValue().getBlobs() == null - ? Collections.emptyList() - : response.getValue().getBlobs().stream() + List value = response.getValue().getBlobs().stream() .map(ModelHelper::populateTaggedBlobItem) .collect(Collectors.toList()); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java index cbd5ee299ee25..91cf9759169e6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceAsyncClient.java @@ -819,13 +819,11 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties, } // CORS - if (properties.getCors() != null) { - List corsRules = new ArrayList<>(); - for (BlobCorsRule rule : properties.getCors()) { - corsRules.add(ModelHelper.validatedCorsRule(rule)); - } - finalProperties.setCors(corsRules); + List corsRules = new ArrayList<>(); + for (BlobCorsRule rule : properties.getCors()) { + corsRules.add(ModelHelper.validatedCorsRule(rule)); } + finalProperties.setCors(corsRules); // Default Service Version finalProperties.setDefaultServiceVersion(properties.getDefaultServiceVersion()); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index ffa0271e6dfef..4ea441492f418 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -517,9 +517,7 @@ private PagedResponse findBlobsByTagsHelper(FindBlobsOptions opt ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); - List value = response.getValue().getBlobs() == null - ? Collections.emptyList() - : response.getValue().getBlobs().stream() + List value = response.getValue().getBlobs().stream() .map(ModelHelper::populateTaggedBlobItem) .collect(Collectors.toList()); @@ -721,13 +719,11 @@ public Response setPropertiesWithResponse(BlobServiceProperties properties } // CORS - if (properties.getCors() != null) { - List corsRules = new ArrayList<>(); - for (BlobCorsRule rule : properties.getCors()) { - corsRules.add(ModelHelper.validatedCorsRule(rule)); - } - finalProperties.setCors(corsRules); + List corsRules = new ArrayList<>(); + for (BlobCorsRule rule : properties.getCors()) { + corsRules.add(ModelHelper.validatedCorsRule(rule)); } + finalProperties.setCors(corsRules); // Default Service Version finalProperties.setDefaultServiceVersion(properties.getDefaultServiceVersion()); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index b82cb5d4cab65..e343322efff8e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -57,7 +57,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; -import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.temporal.ChronoUnit; import java.util.ArrayList; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 4c4c2f3a73f7a..b8b64aecb44a9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -181,10 +181,32 @@ public class BlobClientBase { * @param client the async blob client */ protected BlobClientBase(BlobAsyncClientBase client) { - this(client, client.getHttpPipeline(), client.getAccountUrl(), client.getServiceVersion(), - client.getAccountName(), client.getContainerName(), client.getBlobName(), client.getSnapshotId(), - client.getCustomerProvidedKey(), new EncryptionScope().setEncryptionScope(client.getEncryptionScope()), - client.getVersionId()); + if (client.getSnapshotId() != null && client.getVersionId() != null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("'snapshot' and 'versionId' cannot be used at the same time.")); + } + this.client = client; + this.azureBlobStorage = new AzureBlobStorageImplBuilder() + .pipeline(client.getHttpPipeline()) + .url(client.getAccountUrl()) + .version(client.getServiceVersion().getVersion()) + .buildClient(); + this.serviceVersion = client.getServiceVersion(); + + this.accountName = client.getAccountName(); + this.containerName = client.getContainerName(); + this.blobName = client.getBlobName(); + this.snapshot = client.getSnapshotId(); + this.customerProvidedKey = client.getCustomerProvidedKey(); + this.encryptionScope = new EncryptionScope().setEncryptionScope(client.getEncryptionScope()); + this.versionId = client.getVersionId(); + /* Check to make sure the uri is valid. We don't want the error to occur later in the generated layer + when the sas token has already been applied. */ + try { + URI.create(getBlobUrl()); + } catch (IllegalArgumentException ex) { + throw LOGGER.logExceptionAsError(ex); + } } /** @@ -258,7 +280,6 @@ public BlobClientBase getVersionClient(String versionId) { return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), encryptionScope, versionId); - //return new BlobClientBase(client.getVersionClient(versionId)); } /** @@ -275,7 +296,6 @@ public BlobClientBase getEncryptionScopeClient(String encryptionScope) { return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), finalEncryptionScope, getVersionId()); - //return new BlobClientBase(client.getEncryptionScopeAsyncClient(encryptionScope)); } /** @@ -296,7 +316,6 @@ public BlobClientBase getCustomerProvidedKeyClient(CustomerProvidedKey customerP return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), snapshot, finalCustomerProvidedKey, encryptionScope, getVersionId()); - //return new BlobClientBase(client.getCustomerProvidedKeyAsyncClient(customerProvidedKey)); } /** @@ -313,7 +332,7 @@ public String getAccountUrl() { * * @return the URL. */ - public String getBlobUrl() { + public final String getBlobUrl() { String blobUrl = azureBlobStorage.getUrl() + "/" + containerName + "/" + Utility.urlEncode(blobName); if (this.isSnapshot()) { blobUrl = Utility.appendQueryParameter(blobUrl, "snapshot", getSnapshotId()); @@ -322,7 +341,6 @@ public String getBlobUrl() { blobUrl = Utility.appendQueryParameter(blobUrl, "versionid", getVersionId()); } return blobUrl; - //return client.getBlobUrl(); } /** @@ -821,8 +839,7 @@ public SyncPoller beginCopy(BlobBeginCopyOptions options) { final BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); - Function, PollResponse> syncActivationOperation = (pollingContext) -> - { + Function, PollResponse> syncActivationOperation = (pollingContext) -> { try { new URL(options.getSourceUrl()); } catch (MalformedURLException ex) { From 64fad9b2bf45c3b7ce0b9aba41d75e802fa37d1b Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 25 Jul 2024 18:40:36 -0700 Subject: [PATCH 22/45] copying main --- sdk/storage/azure-storage-blob/spotbugs-exclude.xml | 9 --------- .../swagger/src/main/java/BlobStorageCustomization.java | 1 - 2 files changed, 10 deletions(-) diff --git a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml index 418304b6b5feb..1d9d591bb4dd3 100644 --- a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml +++ b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml @@ -36,11 +36,6 @@ - - - - - @@ -51,8 +46,6 @@ - - @@ -120,8 +113,6 @@ - - diff --git a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java index 5c967a988738c..f4e696142b160 100644 --- a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java +++ b/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. From 839a2265174d119adae96e6d6275d54aa355068d Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 25 Jul 2024 18:45:48 -0700 Subject: [PATCH 23/45] removing blank lines from the generated models --- .../blob/implementation/models/BlobsGetAccessControlHeaders.java | 1 - .../storage/blob/implementation/models/BlobsRenameHeaders.java | 1 - .../blob/implementation/models/BlobsSetAccessControlHeaders.java | 1 - .../blob/implementation/models/DirectoriesDeleteHeaders.java | 1 - .../models/DirectoriesGetAccessControlHeaders.java | 1 - .../blob/implementation/models/DirectoriesRenameHeaders.java | 1 - .../models/DirectoriesSetAccessControlHeaders.java | 1 - .../storage/blob/implementation/models/DirectoryHttpHeaders.java | 1 - .../models/PageBlobsGetPageRangesDiffNextHeaders.java | 1 - .../implementation/models/PageBlobsGetPageRangesNextHeaders.java | 1 - .../storage/blob/implementation/models/PageListCollection.java | 1 - .../storage/blob/implementation/models/PageListSegment.java | 1 - 12 files changed, 12 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java index 909c46f8ce4ac..1b3ee4ac2468b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java index ca9fe28dc763e..b772b3519cdc4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java index 7ad15539e2344..0f8d1d7057881 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java index a444220fadafd..7d022a49ce6fe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java index 10a523850a75c..81ef834374d44 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java index cde3602432729..bdbb55aeb8dc9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java index d62cf62aa6676..332dd994c6f6a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java index a759b8b30e80d..9a16c9de11b42 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java index 37e88c0c16783..606b00cead314 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java index 3ba0c564f8962..e48b103d8d4a4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java index b74697380e783..99a697c13cc0a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java index 9e26acce52981..736b9e17fe9de 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java @@ -1,4 +1,3 @@ - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. From 57d7785941f7bf21fbf501b9f8ef501f8c957010 Mon Sep 17 00:00:00 2001 From: Rabab Date: Fri, 26 Jul 2024 18:29:38 -0700 Subject: [PATCH 24/45] adding suppression checkstyle to allow leaseId as non final field in BlobLeaseClient --- sdk/storage/azure-storage-blob/checkstyle-suppressions.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml index f106f985d40b3..3738a3dc073ca 100644 --- a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml +++ b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml @@ -35,6 +35,7 @@ + From 2bbea6c482e674d1fae6cf51648b749884252e3e Mon Sep 17 00:00:00 2001 From: Rabab Date: Fri, 26 Jul 2024 19:41:53 -0700 Subject: [PATCH 25/45] remove unused import --- .../src/main/java/com/azure/storage/blob/BlobServiceClient.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 4ea441492f418..6c8e9c90afd53 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -57,7 +57,6 @@ import java.time.Duration; import java.time.OffsetDateTime; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.Callable; From 241705c6ecb81af58f692a9b97aa3c443261dff9 Mon Sep 17 00:00:00 2001 From: Rabab Date: Mon, 29 Jul 2024 11:30:43 -0700 Subject: [PATCH 26/45] suppressing checkstyle issues --- sdk/storage/azure-storage-blob/checkstyle-suppressions.xml | 1 + sdk/storage/azure-storage-blob/spotbugs-exclude.xml | 4 ++++ .../com/azure/storage/blob/specialized/BlobClientBase.java | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml index 3738a3dc073ca..43135e43e38b7 100644 --- a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml +++ b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml @@ -39,4 +39,5 @@ + diff --git a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml index 1d9d591bb4dd3..76add86673a3a 100644 --- a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml +++ b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml @@ -185,4 +185,8 @@ + + + + diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index b8b64aecb44a9..d451a131e94cc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -332,7 +332,7 @@ public String getAccountUrl() { * * @return the URL. */ - public final String getBlobUrl() { + public String getBlobUrl() { String blobUrl = azureBlobStorage.getUrl() + "/" + containerName + "/" + Utility.urlEncode(blobName); if (this.isSnapshot()) { blobUrl = Utility.appendQueryParameter(blobUrl, "snapshot", getSnapshotId()); From 04263bef0855728cc28d1f10e18154ad21ad1fc4 Mon Sep 17 00:00:00 2001 From: Rabab Date: Mon, 29 Jul 2024 12:48:59 -0700 Subject: [PATCH 27/45] adding BlobClientBase to override CT_CONSTRUCTOR_THROW exception --- sdk/storage/azure-storage-blob/checkstyle-suppressions.xml | 1 - sdk/storage/azure-storage-blob/spotbugs-exclude.xml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml index 43135e43e38b7..3738a3dc073ca 100644 --- a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml +++ b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml @@ -39,5 +39,4 @@ - diff --git a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml index 76add86673a3a..8b12ac100b680 100644 --- a/sdk/storage/azure-storage-blob/spotbugs-exclude.xml +++ b/sdk/storage/azure-storage-blob/spotbugs-exclude.xml @@ -8,6 +8,7 @@ + From da4166a2ae72838b4cd38cbcb0bb17626ce0ac62 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 31 Jul 2024 12:29:04 -0700 Subject: [PATCH 28/45] adding extra check in BlobClientBase.existsWithResponse --- .../com/azure/storage/blob/BlobClient.java | 55 ++----------------- .../blob/specialized/AppendBlobClient.java | 12 ++-- .../blob/specialized/BlobClientBase.java | 32 ++++++----- .../blob/specialized/BlockBlobClient.java | 15 ++--- 4 files changed, 36 insertions(+), 78 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java index fef680a6ad4bb..2951e455c2256 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClient.java @@ -101,49 +101,6 @@ protected BlobClient(BlobAsyncClient client) { this.client = client; } - /** - * Protected constructor for use by {@link BlobClientBuilder}. - * - * @param client the async blob client - * @param pipeline The pipeline used to send and receive service requests. - * @param url The endpoint where to send service requests. - * @param serviceVersion The version of the service to receive requests. - * @param accountName The storage account name. - * @param containerName The container name. - * @param blobName The blob name. - * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. - * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass - * {@code null} to allow the service to use its own encryption. - */ - protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, - String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey) { - this(client, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, - customerProvidedKey, null); - } - - /** - * Protected constructor for use by {@link BlobClientBuilder}. - * - * @param client the async blob client - * @param pipeline The pipeline used to send and receive service requests. - * @param url The endpoint where to send service requests. - * @param serviceVersion The version of the service to receive requests. - * @param accountName The storage account name. - * @param containerName The container name. - * @param blobName The blob name. - * @param snapshot The snapshot identifier for the blob, pass {@code null} to interact with the blob directly. - * @param customerProvidedKey Customer provided key used during encryption of the blob's data on the server, pass - * {@code null} to allow the service to use its own encryption. - * @param encryptionScope Encryption scope used during encryption of the blob's data on the server, pass - * {@code null} to allow the service to use its own encryption. - */ - protected BlobClient(BlobAsyncClient client, HttpPipeline pipeline, String url, BlobServiceVersion serviceVersion, - String accountName, String containerName, String blobName, String snapshot, CpkInfo customerProvidedKey, - EncryptionScope encryptionScope) { - this(client, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, - encryptionScope, null); - } - /** * Protected constructor for use by {@link BlobClientBuilder}. * @@ -212,9 +169,9 @@ public BlobClient getEncryptionScopeClient(String encryptionScope) { if (encryptionScope != null) { finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); } - return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), - getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), finalEncryptionScope, - getVersionId()); + return new BlobClient(this.client.getEncryptionScopeAsyncClient(encryptionScope), getHttpPipeline(), + getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), + getCustomerProvidedKey(), finalEncryptionScope, getVersionId()); } /** @@ -233,9 +190,9 @@ public BlobClient getCustomerProvidedKeyClient(CustomerProvidedKey customerProvi .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } - return new BlobClient(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), - getContainerName(), getBlobName(), getSnapshotId(), finalCustomerProvidedKey, encryptionScope, - getVersionId()); + return new BlobClient(this.client.getCustomerProvidedKeyAsyncClient(customerProvidedKey), getHttpPipeline(), + getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), + finalCustomerProvidedKey, encryptionScope, getVersionId()); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 4b8f6075da102..2fa478e6a8a65 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -147,9 +147,9 @@ public AppendBlobClient getEncryptionScopeClient(String encryptionScope) { if (encryptionScope != null) { finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); } - return new AppendBlobClient(this.appendBlobAsyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), - finalEncryptionScope, getVersionId()); + return new AppendBlobClient(this.appendBlobAsyncClient.getEncryptionScopeAsyncClient(encryptionScope), + getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), + getBlobName(), getSnapshotId(), getCustomerProvidedKey(), finalEncryptionScope, getVersionId()); } /** @@ -168,9 +168,9 @@ public AppendBlobClient getCustomerProvidedKeyClient(CustomerProvidedKey custome .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } - return new AppendBlobClient(this.appendBlobAsyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), finalCustomerProvidedKey, - encryptionScope, getVersionId()); + return new AppendBlobClient(this.appendBlobAsyncClient.getCustomerProvidedKeyAsyncClient(customerProvidedKey), + getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), + getBlobName(), getSnapshotId(), finalCustomerProvidedKey, encryptionScope, getVersionId()); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index d451a131e94cc..9843f61885906 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -57,6 +57,7 @@ import com.azure.storage.blob.models.BlobDownloadContentAsyncResponse; import com.azure.storage.blob.models.BlobDownloadContentResponse; import com.azure.storage.blob.models.BlobDownloadResponse; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobImmutabilityPolicy; import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; @@ -264,9 +265,9 @@ protected BlobClientBase(BlobAsyncClientBase client, HttpPipeline pipeline, Stri * @return a {@link BlobClientBase} used to interact with the specific snapshot. */ public BlobClientBase getSnapshotClient(String snapshot) { - return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), encryptionScope, - getVersionId()); + return new BlobClientBase(this.client.getSnapshotClient(snapshot), getHttpPipeline(), getAccountUrl(), + getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), snapshot, + getCustomerProvidedKey(), encryptionScope, getVersionId()); } /** @@ -277,9 +278,9 @@ public BlobClientBase getSnapshotClient(String snapshot) { * @return a {@link BlobClientBase} used to interact with the specific version. */ public BlobClientBase getVersionClient(String versionId) { - return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), - encryptionScope, versionId); + return new BlobClientBase(this.client.getVersionClient(versionId), getHttpPipeline(), getAccountUrl(), + getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), + getCustomerProvidedKey(), encryptionScope, versionId); } /** @@ -293,9 +294,9 @@ public BlobClientBase getEncryptionScopeClient(String encryptionScope) { if (encryptionScope != null) { finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); } - return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getContainerName(), getBlobName(), snapshot, getCustomerProvidedKey(), - finalEncryptionScope, getVersionId()); + return new BlobClientBase(this.client.getEncryptionScopeAsyncClient(encryptionScope), getHttpPipeline(), + getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), snapshot, + getCustomerProvidedKey(), finalEncryptionScope, getVersionId()); } /** @@ -313,9 +314,9 @@ public BlobClientBase getCustomerProvidedKeyClient(CustomerProvidedKey customerP .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } - return new BlobClientBase(this.client, getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getContainerName(), getBlobName(), snapshot, finalCustomerProvidedKey, encryptionScope, - getVersionId()); + return new BlobClientBase(this.client.getCustomerProvidedKeyAsyncClient(customerProvidedKey), getHttpPipeline(), + getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), snapshot, + finalCustomerProvidedKey, encryptionScope, getVersionId()); } /** @@ -694,8 +695,11 @@ public Response existsWithResponse(Duration timeout, Context context) { null, null, null, null, null, null, customerProvidedKey, context); return new SimpleResponse<>(sendRequest(operation, timeout, BlobStorageException.class), true); } catch (RuntimeException e) { - if (ModelHelper.checkBlobDoesNotExistStatusCode(e) && e instanceof HttpResponseException) { - HttpResponse response = ((HttpResponseException) e).getResponse(); + HttpResponse response = ((HttpResponseException) e).getResponse(); + if (e instanceof BlobStorageException + && BlobErrorCode.BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION.equals(((BlobStorageException) e).getErrorCode())) { + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), true); + } else if (ModelHelper.checkBlobDoesNotExistStatusCode(e)) { return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), false); } else { throw LOGGER.logExceptionAsError(e); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java index d802da4b9904e..2bc2c3e51aaaa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlockBlobClient.java @@ -142,10 +142,9 @@ public BlockBlobClient getEncryptionScopeClient(String encryptionScope) { if (encryptionScope != null) { finalEncryptionScope = new EncryptionScope().setEncryptionScope(encryptionScope); } - BlockBlobAsyncClient asyncClient = client.getEncryptionScopeAsyncClient(encryptionScope); - return new BlockBlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), getAccountName(), - getContainerName(), getBlobName(), getSnapshotId(), getCustomerProvidedKey(), finalEncryptionScope, - getVersionId()); + return new BlockBlobClient(client.getEncryptionScopeAsyncClient(encryptionScope), getHttpPipeline(), + getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), + getCustomerProvidedKey(), finalEncryptionScope, getVersionId()); } /** @@ -164,11 +163,9 @@ public BlockBlobClient getCustomerProvidedKeyClient(CustomerProvidedKey customer .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptionAlgorithm(customerProvidedKey.getEncryptionAlgorithm()); } - BlockBlobAsyncClient asyncClient = client.getCustomerProvidedKeyAsyncClient(customerProvidedKey); - - return new BlockBlobClient(asyncClient, getHttpPipeline(), getAccountUrl(), getServiceVersion(), - getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), finalCustomerProvidedKey, - encryptionScope, getVersionId()); + return new BlockBlobClient(client.getCustomerProvidedKeyAsyncClient(customerProvidedKey), getHttpPipeline(), + getAccountUrl(), getServiceVersion(), getAccountName(), getContainerName(), getBlobName(), getSnapshotId(), + finalCustomerProvidedKey, encryptionScope, getVersionId()); } /** From 500b1b7409353bc8aa5f6db3b7f09632c0427d00 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 31 Jul 2024 15:13:16 -0700 Subject: [PATCH 29/45] fixing lint issues --- .../storage/blob/specialized/BlobClientBase.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 9843f61885906..d6296384de821 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -695,12 +695,16 @@ public Response existsWithResponse(Duration timeout, Context context) { null, null, null, null, null, null, customerProvidedKey, context); return new SimpleResponse<>(sendRequest(operation, timeout, BlobStorageException.class), true); } catch (RuntimeException e) { - HttpResponse response = ((HttpResponseException) e).getResponse(); - if (e instanceof BlobStorageException - && BlobErrorCode.BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION.equals(((BlobStorageException) e).getErrorCode())) { - return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), true); - } else if (ModelHelper.checkBlobDoesNotExistStatusCode(e)) { - return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), false); + if (e instanceof HttpResponseException) { + HttpResponse response = ((HttpResponseException) e).getResponse(); + if (e instanceof BlobStorageException + && BlobErrorCode.BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION.equals(((BlobStorageException) e).getErrorCode())) { + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), true); + } else if (ModelHelper.checkBlobDoesNotExistStatusCode(e)) { + return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), false); + } else { + throw LOGGER.logExceptionAsError(e); + } } else { throw LOGGER.logExceptionAsError(e); } From 06f283117652b73cbe1f3e1aa57554c06418092d Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 22 Aug 2024 17:40:53 -0700 Subject: [PATCH 30/45] adding wrapTimeoutServiceCallWithExceptionMapping to each api call --- .../storage/blob/BlobContainerClient.java | 64 +++++---- .../azure/storage/blob/BlobServiceClient.java | 44 +++--- .../blob/implementation/util/ModelHelper.java | 20 +++ .../blob/specialized/AppendBlobClient.java | 16 ++- .../blob/specialized/BlobClientBase.java | 125 ++++++++++-------- .../blob/specialized/BlobLeaseClient.java | 83 ++++++------ .../blob/specialized/PageBlobClient.java | 92 +++++++------ 7 files changed, 256 insertions(+), 188 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index 1fca766343629..aac26a1fd1eaa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -74,6 +74,8 @@ import java.util.stream.Collectors; import java.util.function.Consumer; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapServiceCallWithExceptionMapping; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapTimeoutServiceCallWithExceptionMapping; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** @@ -428,9 +430,9 @@ public void create() { public Response createWithResponse(Map metadata, PublicAccessType accessType, Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getContainers() + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getContainers() .createNoCustomHeadersWithResponse(containerName, null, metadata, accessType, null, - blobContainerEncryptionScope, finalContext); + blobContainerEncryptionScope, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -564,10 +566,10 @@ public Response deleteWithResponse(BlobRequestConditions requestConditions } Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getContainers() - .deleteNoCustomHeadersWithResponse(containerName, null, finalRequestConditions.getLeaseId(), - finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), null, - finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getContainers().deleteNoCustomHeadersWithResponse(containerName, null, + finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), null, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -688,9 +690,10 @@ public BlobContainerProperties getProperties() { public Response getPropertiesWithResponse(String leaseId, Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getContainers().getPropertiesWithResponse(containerName, null, leaseId, null, - finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getContainers().getPropertiesWithResponse(containerName, null, leaseId, null, + finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); ContainersGetPropertiesHeaders hd = response.getDeserializedHeaders(); @@ -765,9 +768,10 @@ public Response setMetadataWithResponse(Map metadata, throw LOGGER.logExceptionAsError(new UnsupportedOperationException( "If-Modified-Since is the only HTTP access condition supported for this API")); } - Callable> operation = () -> azureBlobStorage.getContainers().setMetadataWithResponse( - containerName, null, finalRequestConditions.getLeaseId(), metadata, - finalRequestConditions.getIfModifiedSince(), null, finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + azureBlobStorage.getContainers().setMetadataWithResponse(containerName, null, + finalRequestConditions.getLeaseId(), metadata, finalRequestConditions.getIfModifiedSince(), null, + finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -829,9 +833,10 @@ public BlobContainerAccessPolicies getAccessPolicy() { public Response getAccessPolicyWithResponse(String leaseId, Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getContainers().getAccessPolicyWithResponse(containerName, null, leaseId, null, - finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getContainers().getAccessPolicyWithResponse(containerName, null, leaseId, null, + finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, new BlobContainerAccessPolicies( @@ -934,10 +939,10 @@ public Response setAccessPolicyWithResponse(PublicAccessType accessType, } List finalIdentifiers = ModelHelper.truncateTimeForBlobSignedIdentifier(identifiers); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getContainers() - .setAccessPolicyNoCustomHeadersWithResponse(containerName, null, finalRequestConditions.getLeaseId(), - accessType, finalRequestConditions.getIfModifiedSince(), - finalRequestConditions.getIfUnmodifiedSince(), null, finalIdentifiers, finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getContainers().setAccessPolicyNoCustomHeadersWithResponse(containerName, null, + finalRequestConditions.getLeaseId(), accessType, finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), null, finalIdentifiers, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1058,9 +1063,10 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin Supplier> operation = () -> { ResponseBase response = - this.azureBlobStorage.getContainers().listBlobFlatSegmentWithResponse( - containerName, finalOptions.getPrefix(), nextMarker, finalOptions.getMaxResultsPerPage(), - include, null, null, Context.NONE); + wrapServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getContainers().listBlobFlatSegmentWithResponse(containerName, + finalOptions.getPrefix(), nextMarker, finalOptions.getMaxResultsPerPage(), include, null, + null, Context.NONE)); List value = response.getValue().getSegment() == null ? Collections.emptyList() : response.getValue().getSegment().getBlobItems().stream() @@ -1207,8 +1213,8 @@ private PagedResponse listBlobsHierarchySegment(String marker, String : options.getDetails().toList(); Callable> operation = - () -> azureBlobStorage.getContainers().listBlobHierarchySegmentWithResponse(containerName, delimiter, - options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, null, Context.NONE); + wrapTimeoutServiceCallWithExceptionMapping(() -> azureBlobStorage.getContainers().listBlobHierarchySegmentWithResponse(containerName, delimiter, + options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, null, Context.NONE)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); @@ -1286,10 +1292,11 @@ public PagedIterable findBlobsByTags(FindBlobsOptions options, D private PagedResponse findBlobsByTagsHelper( FindBlobsOptions options, String marker, Duration timeout, Context context) { - Callable> operation = () -> + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getContainers().filterBlobsWithResponse( containerName, null, null, options.getQuery(), marker, - options.getMaxResultsPerPage(), null, context); + options.getMaxResultsPerPage(), null, context)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); @@ -1349,8 +1356,9 @@ public StorageAccountInfo getAccountInfo(Duration timeout) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getAccountInfoWithResponse(Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getContainers().getAccountInfoWithResponse(containerName, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getContainers().getAccountInfoWithResponse(containerName, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); ContainersGetAccountInfoHeaders hd = response.getDeserializedHeaders(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java index 50f2b05b0cd21..f6743e2815ae9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobServiceClient.java @@ -63,6 +63,7 @@ import java.util.function.BiFunction; import java.util.stream.Collectors; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapTimeoutServiceCallWithExceptionMapping; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; import java.util.function.Consumer; @@ -445,9 +446,9 @@ private PagedResponse listBlobContainersSegment(String marker // Set up the include types based on the details provided in the options List include = ModelHelper.toIncludeTypes(details); - Callable> operation = () -> this.azureBlobStorage.getServices() - .listBlobContainersSegmentSinglePage(prefix, marker, maxResultsPerPage, include, - null, null, Context.NONE); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getServices().listBlobContainersSegmentSinglePage(prefix, marker, maxResultsPerPage, + include, null, null, Context.NONE)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -510,9 +511,10 @@ private PagedResponse findBlobsByTagsHelper(FindBlobsOptions opt Context finalContext = context == null ? Context.NONE : context; StorageImplUtils.assertNotNull("options", options); - Callable> operation = () -> - this.azureBlobStorage.getServices().filterBlobsWithResponse(null, null, options.getQuery(), marker, - options.getMaxResultsPerPage(), null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getServices().filterBlobsWithResponse(null, null, options.getQuery(), marker, + options.getMaxResultsPerPage(), null, finalContext)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); @@ -578,8 +580,9 @@ public BlobServiceProperties getProperties() { public Response getPropertiesWithResponse(Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; throwOnAnonymousAccess(); - Callable> operation = () -> - this.azureBlobStorage.getServices().getPropertiesWithResponse(null, null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getServices().getPropertiesWithResponse(null, null, finalContext)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); @@ -738,8 +741,9 @@ public Response setPropertiesWithResponse(BlobServiceProperties properties finalProperties = null; } Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getServices() - .setPropertiesNoCustomHeadersWithResponse(finalProperties, null, null, finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getServices().setPropertiesNoCustomHeadersWithResponse(finalProperties, null, null, + finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -794,10 +798,11 @@ public Response getUserDelegationKeyWithResponse(OffsetDateTi } throwOnAnonymousAccess(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getServices().getUserDelegationKeyWithResponse(new KeyInfo() .setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) - .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), null, null, finalContext); + .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)), null, null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, response.getValue()); @@ -848,8 +853,9 @@ public BlobServiceStatistics getStatistics() { public Response getStatisticsWithResponse(Duration timeout, Context context) { throwOnAnonymousAccess(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getServices().getStatisticsWithResponse(null, null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getServices().getStatisticsWithResponse(null, null, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -886,8 +892,9 @@ public StorageAccountInfo getAccountInfo() { public Response getAccountInfoWithResponse(Duration timeout, Context context) { throwOnAnonymousAccess(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getServices().getAccountInfoWithResponse(finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getServices().getAccountInfoWithResponse(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); ServicesGetAccountInfoHeaders hd = response.getDeserializedHeaders(); @@ -1075,9 +1082,10 @@ public Response undeleteBlobContainerWithResponse(UndeleteB hasOptionalDestinationContainerName ? options.getDestinationContainerName() : options.getDeletedContainerName(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getContainers().restoreWithResponse(finalDestinationContainerName, null, null, - options.getDeletedContainerName(), options.getDeletedContainerVersion(), finalContext); + options.getDeletedContainerName(), options.getDeletedContainerVersion(), finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, getBlobContainerClient(finalDestinationContainerName)); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index 1217e205ff134..0d1c3fbc6dab0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -67,6 +67,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.Callable; +import java.util.function.Supplier; /** * This class provides helper methods for common model patterns. @@ -701,6 +703,24 @@ public static Throwable mapToBlobStorageException(Throwable internal) { return internal; } + public static Callable wrapTimeoutServiceCallWithExceptionMapping(Supplier serviceCall) { + return () -> { + try { + return serviceCall.get(); + } catch (BlobStorageExceptionInternal internal) { + throw (BlobStorageException) mapToBlobStorageException(internal); + } + }; + } + + public static T wrapServiceCallWithExceptionMapping(Supplier serviceCall) { + try { + return serviceCall.get(); + } catch (BlobStorageExceptionInternal internal) { + throw (BlobStorageException) mapToBlobStorageException(internal); + } + } + private ModelHelper() { } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java index 2fa478e6a8a65..f32655608e183 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobClient.java @@ -48,6 +48,7 @@ import java.util.Objects; import java.util.concurrent.Callable; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapTimeoutServiceCallWithExceptionMapping; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** @@ -338,14 +339,15 @@ public Response createWithResponse(AppendBlobCreateOptions optio Context finalContext = context == null ? Context.NONE : context; BlobImmutabilityPolicy immutabilityPolicy = finalOptions.getImmutabilityPolicy() == null ? new BlobImmutabilityPolicy() : finalOptions.getImmutabilityPolicy(); - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getAppendBlobs().createWithResponse(containerName, blobName, 0, null, finalOptions.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, ModelHelper.tagsToString(finalOptions.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), finalOptions.hasLegalHold(), finalOptions.getHeaders(), - getCustomerProvidedKey(), encryptionScope, finalContext); + getCustomerProvidedKey(), encryptionScope, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); AppendBlobsCreateHeaders hd = response.getDeserializedHeaders(); @@ -670,11 +672,11 @@ public Response sealWithResponse(AppendBlobSealOptions options, Duration t ? new AppendBlobRequestConditions() : finalOptions.getRequestConditions(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getAppendBlobs() - .sealNoCustomHeadersWithResponse(containerName, blobName, null, null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getAppendPosition(), finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getAppendBlobs().sealNoCustomHeadersWithResponse(containerName, blobName, null, null, + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getAppendPosition(), finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 0d46724be5b9e..5da53e411a55f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -29,6 +29,7 @@ import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; import com.azure.storage.blob.implementation.models.BlobPropertiesInternalGetProperties; +import com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal; import com.azure.storage.blob.implementation.models.BlobTag; import com.azure.storage.blob.implementation.models.BlobTags; import com.azure.storage.blob.implementation.models.BlobsCopyFromURLHeaders; @@ -126,6 +127,8 @@ import java.util.function.Function; import java.util.function.Consumer; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapServiceCallWithExceptionMapping; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapTimeoutServiceCallWithExceptionMapping; import static com.azure.storage.common.implementation.StorageImplUtils.blockWithOptionalTimeout; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; @@ -979,9 +982,9 @@ public void abortCopyFromUrl(String copyId) { public Response abortCopyFromUrlWithResponse(String copyId, String leaseId, Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getBlobs().abortCopyFromURLNoCustomHeadersWithResponse(containerName, blobName, - copyId, null, leaseId, null, finalContext); + copyId, null, leaseId, null, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1112,16 +1115,17 @@ public Response copyFromUrlWithResponse(BlobCopyFromUrlOptions options, String sourceAuth = options.getSourceAuthorization() == null ? null : options.getSourceAuthorization().toString(); - Callable> operation = () -> - this.azureBlobStorage.getBlobs().copyFromURLWithResponse(containerName, blobName, options.getCopySource(), - null, options.getMetadata(), options.getTier(), sourceModifiedRequestConditions.getIfModifiedSince(), - sourceModifiedRequestConditions.getIfUnmodifiedSince(), sourceModifiedRequestConditions.getIfMatch(), - sourceModifiedRequestConditions.getIfNoneMatch(), destRequestConditions.getIfModifiedSince(), - destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), - destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), - destRequestConditions.getLeaseId(), null, null, ModelHelper.tagsToString(options.getTags()), - immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), - sourceAuth, options.getCopySourceTagsMode(), this.encryptionScope, context); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getBlobs().copyFromURLWithResponse(containerName, blobName, + options.getCopySource(), null, options.getMetadata(), options.getTier(), + sourceModifiedRequestConditions.getIfModifiedSince(), + sourceModifiedRequestConditions.getIfUnmodifiedSince(), sourceModifiedRequestConditions.getIfMatch(), + sourceModifiedRequestConditions.getIfNoneMatch(), destRequestConditions.getIfModifiedSince(), + destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), + destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), + destRequestConditions.getLeaseId(), null, null, ModelHelper.tagsToString(options.getTags()), + immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), + sourceAuth, options.getCopySourceTagsMode(), this.encryptionScope, context)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsCopyId()); @@ -1647,12 +1651,12 @@ public Response deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSna BlobRequestConditions requestConditions, Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - Callable> operation = () -> azureBlobStorage.getBlobs().deleteNoCustomHeadersWithResponse( - containerName, blobName, snapshot, versionId, null, finalRequestConditions.getLeaseId(), - deleteBlobSnapshotOptions, finalRequestConditions.getIfModifiedSince(), - finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), - finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, null, - finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + azureBlobStorage.getBlobs().deleteNoCustomHeadersWithResponse(containerName, blobName, snapshot, versionId, + null, finalRequestConditions.getLeaseId(), deleteBlobSnapshotOptions, + finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), + finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), + finalRequestConditions.getTagsConditions(), null, null, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1779,12 +1783,13 @@ public Response getPropertiesWithResponse(BlobRequestConditions Context context) { BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getBlobs().getPropertiesWithResponse(containerName, blobName, snapshot, versionId, null, finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, - customerProvidedKey, finalContext); + customerProvidedKey, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, BlobPropertiesConstructorProxy @@ -1850,12 +1855,12 @@ public Response setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobRe : requestConditions; Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getBlobs().setHttpHeadersNoCustomHeadersWithResponse(containerName, blobName, null, finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, headers, - finalContext); + finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1917,12 +1922,12 @@ public Response setMetadataWithResponse(Map metadata, Blob : requestConditions; Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getBlobs().setMetadataNoCustomHeadersWithResponse(containerName, blobName, null, metadata, finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, - customerProvidedKey, encryptionScope, finalContext); + customerProvidedKey, encryptionScope, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1978,9 +1983,10 @@ public Response> getTagsWithResponse(BlobGetTagsOptions opti ? new BlobRequestConditions() : finalTagOptions.getRequestConditions(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getBlobs().getTagsWithResponse(containerName, blobName, null, null, snapshot, - versionId, requestConditions.getTagsConditions(), requestConditions.getLeaseId(), finalContext); + versionId, requestConditions.getTagsConditions(), requestConditions.getLeaseId(), finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); Map tags = new HashMap<>(); @@ -2050,9 +2056,10 @@ public Response setTagsWithResponse(BlobSetTagsOptions options, Duration t } } BlobTags t = new BlobTags().setBlobTagSet(tagList); - Callable> operation = () -> - this.azureBlobStorage.getBlobs().setTagsNoCustomHeadersWithResponse(containerName, blobName, null, versionId, - null, null, null, requestConditions.getTagsConditions(), requestConditions.getLeaseId(), t, finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getBlobs().setTagsNoCustomHeadersWithResponse(containerName, blobName, null, + versionId, null, null, null, requestConditions.getTagsConditions(), requestConditions.getLeaseId(), t, + finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2112,12 +2119,12 @@ public Response createSnapshotWithResponse(Map m Context finalContext = context == null ? Context.NONE : context; BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - Callable> operation = () -> this.azureBlobStorage.getBlobs() - .createSnapshotWithResponse(containerName, blobName, null, metadata, + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getBlobs().createSnapshotWithResponse(containerName, blobName, null, metadata, finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), finalRequestConditions.getLeaseId(), null, - customerProvidedKey, encryptionScope, finalContext); + customerProvidedKey, encryptionScope, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, this.getSnapshotClient(response.getDeserializedHeaders().getXMsSnapshot())); @@ -2214,9 +2221,10 @@ public Response setAccessTierWithResponse(BlobSetAccessTierOptions options StorageImplUtils.assertNotNull("options", options); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getBlobs().setTierNoCustomHeadersWithResponse( - containerName, blobName, options.getTier(), snapshot, versionId, null, options.getPriority(), null, - options.getLeaseId(), options.getTagsConditions(), finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getBlobs().setTierNoCustomHeadersWithResponse(containerName, blobName, + options.getTier(), snapshot, versionId, null, options.getPriority(), null, options.getLeaseId(), + options.getTagsConditions(), finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2262,8 +2270,9 @@ public void undelete() { @ServiceMethod(returns = ReturnType.SINGLE) public Response undeleteWithResponse(Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getBlobs().undeleteNoCustomHeadersWithResponse( - containerName, blobName, null, null, finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getBlobs().undeleteNoCustomHeadersWithResponse(containerName, blobName, null, null, + finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2311,8 +2320,8 @@ public StorageAccountInfo getAccountInfo() { @ServiceMethod(returns = ReturnType.SINGLE) public Response getAccountInfoWithResponse(Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getBlobs() - .getAccountInfoWithResponse(containerName, blobName, finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getBlobs().getAccountInfoWithResponse(containerName, blobName, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -2557,11 +2566,12 @@ public Response openQueryInputStreamWithResponse(BlobQueryOptions q .setInputSerialization(in) .setOutputSerialization(out); - ResponseBase response = this.azureBlobStorage.getBlobs().queryWithResponse( - containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), - null, qr, getCustomerProvidedKey(), Context.NONE); + ResponseBase response = wrapServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getBlobs().queryWithResponse(containerName, blobName, getSnapshotId(), null, + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, qr, + getCustomerProvidedKey(), Context.NONE)); InputStream avroInputStream = response.getValue(); BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); @@ -2661,11 +2671,12 @@ public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Durati .setOutputSerialization(out); Callable> operation = () -> { - ResponseBase response = this.azureBlobStorage.getBlobs() - .queryWithResponse(containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), - null, qr, getCustomerProvidedKey(), finalContext); + ResponseBase response = wrapServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getBlobs().queryWithResponse(containerName, blobName, getSnapshotId(), null, + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, qr, + getCustomerProvidedKey(), finalContext)); InputStream avroInputStream = response.getValue(); BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), @@ -2763,10 +2774,11 @@ public Response setImmutabilityPolicyWithResponse(BlobIm BlobRequestConditionProperty.IF_MODIFIED_SINCE), "setImmutabilityPolicy(WithResponse)", "requestConditions"); - Callable> operation = () -> + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getBlobs().setImmutabilityPolicyWithResponse(containerName, blobName, null, null, finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getExpiryTime(), - finalImmutabilityPolicy.getPolicyMode(), finalContext); + finalImmutabilityPolicy.getPolicyMode(), finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -2818,8 +2830,9 @@ public void deleteImmutabilityPolicy() { @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteImmutabilityPolicyWithResponse(Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getBlobs() - .deleteImmutabilityPolicyNoCustomHeadersWithResponse(containerName, blobName, null, null, finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getBlobs().deleteImmutabilityPolicyNoCustomHeadersWithResponse(containerName, + blobName, null, null, finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2866,9 +2879,9 @@ public BlobLegalHoldResult setLegalHold(boolean legalHold) { @ServiceMethod(returns = ReturnType.SINGLE) public Response setLegalHoldWithResponse(boolean legalHold, Duration timeout, Context context) { Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getBlobs().setLegalHoldWithResponse(containerName, blobName, legalHold, null, null, - finalContext); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getBlobs().setLegalHoldWithResponse(containerName, blobName, legalHold, null, + null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java index 1e0db813c3fd4..a623a848018a6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseClient.java @@ -38,6 +38,7 @@ import java.time.Duration; import java.util.concurrent.Callable; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapTimeoutServiceCallWithExceptionMapping; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** @@ -205,20 +206,22 @@ public Response acquireLeaseWithResponse(BlobAcquireLeaseOptions options Context finalContext = context == null ? Context.NONE : context; if (this.isBlob) { - Callable> operation = () -> - this.client.getBlobs().acquireLeaseWithResponse(containerName, blobName, null, options.getDuration(), - this.leaseId, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.client.getBlobs().acquireLeaseWithResponse(containerName, blobName, null, + options.getDuration(), this.leaseId, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } else { - Callable> operation = () -> - this.client.getContainers().acquireLeaseWithResponse(containerName, null, options.getDuration(), - this.leaseId, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.client.getContainers().acquireLeaseWithResponse(containerName, null, options.getDuration(), + this.leaseId, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); @@ -307,17 +310,19 @@ public Response renewLeaseWithResponse(BlobRenewLeaseOptions options, Du ? new BlobLeaseRequestConditions() : finalOptions.getRequestConditions(); Context finalContext = context == null ? Context.NONE : context; if (this.isBlob) { - Callable> operation = () -> - this.client.getBlobs().renewLeaseWithResponse(containerName, blobName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.client.getBlobs().renewLeaseWithResponse(containerName, blobName, this.leaseId, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } else { - Callable> operation = () -> - this.client.getContainers().renewLeaseWithResponse(containerName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.client.getContainers().renewLeaseWithResponse(containerName, this.leaseId, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } @@ -402,19 +407,19 @@ public Response releaseLeaseWithResponse(BlobReleaseLeaseOptions options, BlobLeaseRequestConditions requestConditions = (finalOptions.getRequestConditions() == null) ? new BlobLeaseRequestConditions() : finalOptions.getRequestConditions(); Context finalContext = context == null ? Context.NONE : context; + Callable> operation; if (this.isBlob) { - Callable> operation = () -> + operation = wrapTimeoutServiceCallWithExceptionMapping(() -> this.client.getBlobs().releaseLeaseNoCustomHeadersWithResponse(containerName, blobName, this.leaseId, null, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, finalContext); - return sendRequest(operation, timeout, BlobStorageException.class); + requestConditions.getTagsConditions(), null, finalContext)); } else { - Callable> operation = () -> + operation = wrapTimeoutServiceCallWithExceptionMapping(() -> this.client.getContainers().releaseLeaseNoCustomHeadersWithResponse(containerName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, finalContext); - return sendRequest(operation, timeout, BlobStorageException.class); + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, finalContext)); } + return sendRequest(operation, timeout, BlobStorageException.class); } /** @@ -514,18 +519,19 @@ public Response breakLeaseWithResponse(BlobBreakLeaseOptions options, D : Math.toIntExact(finalOptions.getBreakPeriod().getSeconds()); if (this.isBlob) { - Callable> operation = () -> - this.client.getBlobs().breakLeaseWithResponse(containerName, blobName, null, breakPeriod, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.client.getBlobs().breakLeaseWithResponse(containerName, blobName, null, breakPeriod, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), + requestConditions.getTagsConditions(), null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseTime()); } else { - Callable> operation = () -> - this.client.getContainers().breakLeaseWithResponse(containerName, null, breakPeriod, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, - finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> this.client.getContainers().breakLeaseWithResponse( + containerName, null, breakPeriod, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseTime()); } @@ -614,20 +620,21 @@ public Response changeLeaseWithResponse(BlobChangeLeaseOptions options, Context finalContext = context == null ? Context.NONE : context; if (this.isBlob) { - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping(() -> this.client.getBlobs().changeLeaseWithResponse(containerName, blobName, this.leaseId, options.getProposedId(), null, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, finalContext); + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); } else { - Callable> operation = () -> - this.client.getContainers().changeLeaseWithResponse(containerName, this.leaseId, options.getProposedId(), - null, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, - finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.client.getContainers().changeLeaseWithResponse(containerName, this.leaseId, + options.getProposedId(), null, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java index bc336620695a1..9b34468cfdc82 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/PageBlobClient.java @@ -74,6 +74,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static com.azure.storage.blob.implementation.util.ModelHelper.wrapTimeoutServiceCallWithExceptionMapping; import static com.azure.storage.common.implementation.StorageImplUtils.sendRequest; /** @@ -362,14 +363,15 @@ public Response createWithResponse(PageBlobCreateOptions options, BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getPageBlobs().createWithResponse(containerName, blobName, 0, options.getSize(), null, null, options.getMetadata(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), options.getSequenceNumber(), null, ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.isLegalHold(), options.getHeaders(), - getCustomerProvidedKey(), encryptionScope, finalContext); + getCustomerProvidedKey(), encryptionScope, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -752,16 +754,16 @@ public Response clearPagesWithResponse(PageRange pageRange, } String pageRangeStr = ModelHelper.pageRangeToString(pageRange); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getPageBlobs().clearPagesWithResponse(containerName, blobName, 0, null, pageRangeStr, - finalPageBlobRequestConditions.getLeaseId(), + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getPageBlobs().clearPagesWithResponse(containerName, blobName, 0, null, + pageRangeStr, finalPageBlobRequestConditions.getLeaseId(), finalPageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), finalPageBlobRequestConditions.getIfSequenceNumberLessThan(), finalPageBlobRequestConditions.getIfSequenceNumberEqualTo(), finalPageBlobRequestConditions.getIfModifiedSince(), finalPageBlobRequestConditions.getIfUnmodifiedSince(), finalPageBlobRequestConditions.getIfMatch(), - finalPageBlobRequestConditions.getIfNoneMatch(), finalPageBlobRequestConditions.getTagsConditions(), null, - getCustomerProvidedKey(), encryptionScope, finalContext); + finalPageBlobRequestConditions.getIfNoneMatch(), finalPageBlobRequestConditions.getTagsConditions(), + null, getCustomerProvidedKey(), encryptionScope, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); PageBlobsClearPagesHeaders hd = response.getDeserializedHeaders(); @@ -836,13 +838,13 @@ public Response getPageRangesWithResponse(BlobRange blobRange, BlobReq BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getPageBlobs().getPageRangesWithResponse(containerName, blobName, - getSnapshotId(), null, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getPageBlobs().getPageRangesWithResponse(containerName, blobName, getSnapshotId(), + null, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), - finalRequestConditions.getTagsConditions(), null, null, null, - finalContext); + finalRequestConditions.getTagsConditions(), null, null, null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -920,12 +922,13 @@ public PagedIterable listPageRanges(ListPageRangesOptions options Integer finalPageSize = pageSize == null ? options.getMaxResultsPerPage() : pageSize; // Call the synchronous service method - Callable> operation = () -> + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getPageBlobs().getPageRangesWithResponse(containerName, blobName, getSnapshotId(), null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, continuationToken, finalPageSize, finalContext); + requestConditions.getTagsConditions(), null, continuationToken, finalPageSize, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -1040,12 +1043,14 @@ public Response getPageRangesDiffWithResponse(BlobRange blobRange, Str } Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse(containerName, blobName, getSnapshotId(), - null, prevSnapshot, null, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), - finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), - finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), - finalRequestConditions.getTagsConditions(), null, null, null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse(containerName, blobName, + getSnapshotId(), null, prevSnapshot, null, finalBlobRange.toHeaderValue(), + finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, null, + null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -1130,14 +1135,14 @@ public PagedIterable listPageRangesDiff(ListPageRangesDiffOptions // Dynamically use pageSize provided during the iteration if available Integer finalPageSize = pageSize != null ? pageSize : options.getMaxResultsPerPage(); - Callable> operation = () -> - this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse( - containerName, blobName, getSnapshotId(), null, - options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), - requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, continuationToken, finalPageSize, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse(containerName, blobName, + getSnapshotId(), null, options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, continuationToken, + finalPageSize, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -1239,12 +1244,14 @@ public Response getManagedDiskPageRangesDiffWithResponse(BlobRange blo } Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse(containerName, blobName, getSnapshotId(), - null, null, prevSnapshotUrl, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), - finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), - finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), - finalRequestConditions.getTagsConditions(), null, null, null, finalContext); + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getPageBlobs().getPageRangesDiffWithResponse(containerName, blobName, + getSnapshotId(), null, null, prevSnapshotUrl, finalBlobRange.toHeaderValue(), + finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), + finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, null, + null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), @@ -1310,12 +1317,13 @@ public Response resizeWithResponse(long size, BlobRequestCondition : requestConditions; Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getPageBlobs().resizeWithResponse(containerName, blobName, size, null, finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), null, - getCustomerProvidedKey(), encryptionScope, finalContext); + getCustomerProvidedKey(), encryptionScope, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); PageBlobsResizeHeaders hd = response.getDeserializedHeaders(); @@ -1388,12 +1396,13 @@ public Response updateSequenceNumberWithResponse(SequenceNumberAct Long finalSequenceNumber = action == SequenceNumberActionType.INCREMENT ? null : sequenceNumber; Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> this.azureBlobStorage.getPageBlobs().updateSequenceNumberWithResponse(containerName, blobName, action, null, finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), finalRequestConditions.getIfMatch(), finalRequestConditions.getIfNoneMatch(), finalRequestConditions.getTagsConditions(), - finalSequenceNumber, null, finalContext); + finalSequenceNumber, null, finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); PageBlobsUpdateSequenceNumberHeaders hd = response.getDeserializedHeaders(); @@ -1567,12 +1576,13 @@ public Response copyIncrementalWithResponse(PageBlobCopyIncremen } Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> - this.azureBlobStorage.getPageBlobs().copyIncrementalWithResponse(containerName, blobName, + Callable> operation = + wrapTimeoutServiceCallWithExceptionMapping(() -> + this.azureBlobStorage.getPageBlobs().copyIncrementalWithResponse(containerName, blobName, builder.toString(), null, modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), modifiedRequestConditions.getIfMatch(), modifiedRequestConditions.getIfNoneMatch(), modifiedRequestConditions.getTagsConditions(), null, - finalContext); + finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsCopyStatus()); From 84fd1b465c36dbdde38906cdbbafba79b53f2ea1 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 22 Aug 2024 17:58:11 -0700 Subject: [PATCH 31/45] fixing exists() test, removing unused import --- .../com/azure/storage/blob/BlobContainerAsyncClient.java | 2 +- .../storage/blob/implementation/util/ModelHelper.java | 1 - .../com/azure/storage/blob/specialized/BlobClientBase.java | 7 +++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 475e0dbc643a8..3c3ed3fc08aa8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -990,7 +990,7 @@ Mono> setAccessPolicyWithResponse(PublicAccessType accessType, return this.azureBlobStorage.getContainers().setAccessPolicyNoCustomHeadersWithResponseAsync(containerName, null, requestConditions.getLeaseId(), accessType, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), null, identifiers, context) + requestConditions.getIfUnmodifiedSince(), null, finalIdentifiers, context) .onErrorMap(ModelHelper::mapToBlobStorageException); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index 0d1c3fbc6dab0..99d0fc1e769ef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -43,7 +43,6 @@ import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.ListBlobContainersIncludeType; -import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.ObjectReplicationPolicy; import com.azure.storage.blob.models.ObjectReplicationRule; import com.azure.storage.blob.models.ObjectReplicationStatus; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 5da53e411a55f..bcf2f54376d6e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -29,7 +29,6 @@ import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; import com.azure.storage.blob.implementation.models.BlobPropertiesInternalGetProperties; -import com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal; import com.azure.storage.blob.implementation.models.BlobTag; import com.azure.storage.blob.implementation.models.BlobTags; import com.azure.storage.blob.implementation.models.BlobsCopyFromURLHeaders; @@ -694,9 +693,9 @@ public Boolean exists() { @ServiceMethod(returns = ReturnType.SINGLE) public Response existsWithResponse(Duration timeout, Context context) { try { - Callable> operation = () -> this.azureBlobStorage.getBlobs() - .getPropertiesNoCustomHeadersWithResponse(containerName, blobName, snapshot, versionId, null, null, - null, null, null, null, null, null, customerProvidedKey, context); + Callable> operation = wrapTimeoutServiceCallWithExceptionMapping( + () -> this.azureBlobStorage.getBlobs().getPropertiesNoCustomHeadersWithResponse(containerName, blobName, + snapshot, versionId, null, null, null, null, null, null, null, null, customerProvidedKey, context)); return new SimpleResponse<>(sendRequest(operation, timeout, BlobStorageException.class), true); } catch (RuntimeException e) { if (e instanceof HttpResponseException) { From 500a5a79e24351d6db388ee86739e91adb92684d Mon Sep 17 00:00:00 2001 From: Rabab Date: Fri, 23 Aug 2024 00:34:58 -0700 Subject: [PATCH 32/45] blob-nio test fix --- .../com/azure/storage/blob/specialized/BlobClientBase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index bcf2f54376d6e..4462a5c9b745d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -857,8 +857,8 @@ public SyncPoller beginCopy(BlobBeginCopyOptions options) { throw LOGGER.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.", ex)); } ResponseBase response = - azureBlobStorage.getBlobs().startCopyFromURLWithResponse(containerName, blobName, - options.getSourceUrl(), null, options.getMetadata(), options.getTier(), + wrapServiceCallWithExceptionMapping(() -> azureBlobStorage.getBlobs().startCopyFromURLWithResponse( + containerName, blobName, options.getSourceUrl(), null, options.getMetadata(), options.getTier(), options.getRehydratePriority(), sourceModifiedConditions.getIfModifiedSince(), sourceModifiedConditions.getIfUnmodifiedSince(), sourceModifiedConditions.getIfMatch(), sourceModifiedConditions.getIfNoneMatch(), sourceModifiedConditions.getTagsConditions(), @@ -867,7 +867,7 @@ public SyncPoller beginCopy(BlobBeginCopyOptions options) { destinationRequestConditions.getIfNoneMatch(), destinationRequestConditions.getTagsConditions(), destinationRequestConditions.getLeaseId(), null, ModelHelper.tagsToString(options.getTags()), options.isSealDestination(), immutabilityPolicy.getExpiryTime(), - immutabilityPolicy.getPolicyMode(), options.isLegalHold(), Context.NONE); + immutabilityPolicy.getPolicyMode(), options.isLegalHold(), Context.NONE)); BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); copyId.set(headers.getXMsCopyId()); From 5e0945fbfb77a2bb4b8e622825ea9544387cefae Mon Sep 17 00:00:00 2001 From: Rabab Date: Fri, 23 Aug 2024 23:07:51 -0700 Subject: [PATCH 33/45] now using new sync internal-avro with BlobQueryReader --- .../implementation/util/BlobQueryReader.java | 194 +++++++++++++++++- .../blob/specialized/BlobClientBase.java | 4 +- 2 files changed, 195 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index 92902c0aa8fc2..006c44263861a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -24,13 +24,17 @@ import com.azure.storage.internal.avro.implementation.AvroConstants; import com.azure.storage.internal.avro.implementation.AvroObject; import com.azure.storage.internal.avro.implementation.AvroReaderFactory; +import com.azure.storage.internal.avro.implementation.AvroReaderSyncFactory; import com.azure.storage.internal.avro.implementation.schema.AvroSchema; import com.azure.storage.internal.avro.implementation.schema.primitive.AvroNullSchema; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.UncheckedIOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; @@ -44,6 +48,7 @@ */ public class BlobQueryReader { + private final ClientLogger LOGGER = new ClientLogger(BlobQueryReader.class); private final Flux avro; private final Consumer progressConsumer; private final Consumer errorConsumer; @@ -88,7 +93,7 @@ public Flux read() { * @return The parsed query reactive stream. * @throws IOException If an I/O error occurs. */ - public InputStream readInputStream(InputStream inputStream) throws IOException { + public InputStream readInputStream(InputStream inputStream) { // Convert InputStream to Flux Flux avroFlux = FluxUtil.toFluxByteBuffer(inputStream); @@ -100,6 +105,73 @@ public InputStream readInputStream(InputStream inputStream) throws IOException { return new FluxInputStream(processedData); } + /** + * Avro parses a query reactive stream. + * + * The Avro stream is formatted as the Avro Header (that specifies the schema) and the Avro Body (that contains + * a series of blocks of data). The Query Avro schema indicates that the objects being emitted from the parser can + * either be a result data record, an end record, a progress record or an error record. + * + * @param inputStream The input stream to read from. + * @return The parsed query reactive stream. + * @throws IOException If an I/O error occurs. + */ + public InputStream readInputStream2(InputStream inputStream) throws IOException { + AvroReaderSyncFactory avroReaderSyncFactory = new AvroReaderSyncFactory(); + ByteBuffer fullBuffer = convertInputStreamToByteBuffer(inputStream); + + Iterable avroObjects = avroReaderSyncFactory.getAvroReader(fullBuffer).read(); + + // serialize AvroObject back to bytes + byte[] processedData = serializeAvroObjectsToBytes(avroObjects); + return new ByteArrayInputStream(processedData); + } + + private ByteBuffer convertInputStreamToByteBuffer(InputStream inputStream) throws IOException { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + byte[] buffer = new byte[1024]; // Temporary buffer size + int bytesRead; + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + byte[] data = outputStream.toByteArray(); // Get all data read from the stream + + // Convert the byte array to ByteBuffer + ByteBuffer byteBuffer = ByteBuffer.allocateDirect(data.length); + byteBuffer.put(data); + byteBuffer.flip(); // Prepare the buffer for reading + return byteBuffer; + } + + private byte[] serializeAvroObjectsToBytes(Iterable avroObjects) { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + for (AvroObject avroObject : avroObjects) { + try { + Object potentialMap = avroObject.getObject(); + if (!(potentialMap instanceof Map)) { + throw new IllegalArgumentException("Expected object to be of type Map"); + } + Map recordMap = (Map) potentialMap; // Safely cast it to a Map + ByteBuffer buffer = parseSyncRecord(recordMap); // Use the Map directly + + if (buffer != null) { + if (buffer.hasArray()) { + outputStream.write(buffer.array(), buffer.position(), buffer.remaining()); + } else { + // If the buffer does not have an accessible array, manually copy + byte[] data = new byte[buffer.remaining()]; + buffer.get(data); + outputStream.write(data); + } + buffer.clear(); // Prepare buffer for next iteration if reusing + } + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); + } + } + return outputStream.toByteArray(); + } + /** * Parses a query record. * @@ -128,6 +200,34 @@ private Mono parseRecord(Object quickQueryRecord) { } } + /** + * Parses a query record. + * + * @param quickQueryRecord The query record. + * @return The optional data in the record. + */ + private ByteBuffer parseSyncRecord(Object quickQueryRecord) { + if (!(quickQueryRecord instanceof Map)) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Expected object to be of type Map")); + } + Map record = (Map) quickQueryRecord; + Object recordSchema = record.get(AvroConstants.RECORD); + + switch (recordSchema.toString()) { + case "resultData": + return parseSyncResultData(record); + case "end": + return parseSyncEnd(record); + case "progress": + return parseSyncProgress(record); + case "error": + return parseSyncError(record); + default: + throw LOGGER.logExceptionAsError(new IllegalStateException(String.format("Unknown record type %s " + + "while parsing query response. ", recordSchema.toString()))); + } + } + /** * Parses a query result data record. * @param dataRecord The query result data record. @@ -145,6 +245,23 @@ private Mono parseResultData(Map dataRecord) { } } + /** + * Parses a query result data record. + * @param dataRecord The query result data record. + * @return The data in the record. + */ + private ByteBuffer parseSyncResultData(Map dataRecord) { + Object data = dataRecord.get("data"); + + if (checkParametersNotNull(data)) { + AvroSchema.checkType("data", data, List.class); + return ByteBuffer.wrap(AvroSchema.getBytes((List) data)); + } else { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Failed to parse result data record from " + + "query response stream.")); + } + } + /** * Parses a query end record. * @param endRecord The query end record. @@ -165,6 +282,26 @@ private Mono parseEnd(Map endRecord) { return Mono.empty(); } + /** + * Parses a query end record. + * @param endRecord The query end record. + * @return Mono.empty or Mono.error + */ + private ByteBuffer parseSyncEnd(Map endRecord) { + if (progressConsumer != null) { + Object totalBytes = endRecord.get("totalBytes"); + + if (checkParametersNotNull(totalBytes)) { + AvroSchema.checkType("totalBytes", totalBytes, Long.class); + progressConsumer.accept(new BlobQueryProgress((long) totalBytes, (long) totalBytes)); + } else { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Failed to parse end record from query " + + "response stream.")); + } + } + return null; + } + /** * Parses a query progress record. * @param progressRecord The query progress record. @@ -187,6 +324,28 @@ private Mono parseProgress(Map progressRecord) { return Mono.empty(); } + /** + * Parses a query progress record. + * @param progressRecord The query progress record. + * @return Mono.empty or Mono.error + */ + private ByteBuffer parseSyncProgress(Map progressRecord) { + if (progressConsumer != null) { + Object bytesScanned = progressRecord.get("bytesScanned"); + Object totalBytes = progressRecord.get("totalBytes"); + + if (checkParametersNotNull(bytesScanned, totalBytes)) { + AvroSchema.checkType("bytesScanned", bytesScanned, Long.class); + AvroSchema.checkType("totalBytes", totalBytes, Long.class); + progressConsumer.accept(new BlobQueryProgress((long) bytesScanned, (long) totalBytes)); + } else { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Failed to parse progress record from " + + "query response stream.")); + } + } + return null; + } + /** * Parses a query error record. * @param errorRecord The query error record. @@ -220,6 +379,39 @@ private Mono parseError(Map errorRecord) { return Mono.empty(); } + /** + * Parses a query error record. + * @param errorRecord The query error record. + * @return Mono.empty or Mono.error + */ + private ByteBuffer parseSyncError(Map errorRecord) { + Object fatal = errorRecord.get("fatal"); + Object name = errorRecord.get("name"); + Object description = errorRecord.get("description"); + Object position = errorRecord.get("position"); + + if (checkParametersNotNull(fatal, name, description, position)) { + AvroSchema.checkType("fatal", fatal, Boolean.class); + AvroSchema.checkType("name", name, String.class); + AvroSchema.checkType("description", description, String.class); + AvroSchema.checkType("position", position, Long.class); + + BlobQueryError error = new BlobQueryError((Boolean) fatal, (String) name, + (String) description, (Long) position); + + if (errorConsumer != null) { + errorConsumer.accept(error); + } else { + throw LOGGER.logExceptionAsError(new UncheckedIOException(new IOException("An error was reported during query response processing, " + + System.lineSeparator() + error.toString()))); + } + } else { + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Failed to parse error record from " + + "query response stream.")); + } + return null; + } + /** * Checks whether or not all parameters are non-null. */ diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index 4462a5c9b745d..cca61e01aeae8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -2575,7 +2575,7 @@ public Response openQueryInputStreamWithResponse(BlobQueryOptions q BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); try { - InputStream resultStream = reader.readInputStream(avroInputStream); + InputStream resultStream = reader.readInputStream2(avroInputStream); return new SimpleResponse<>(response, resultStream); } catch (IOException e) { throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); @@ -2680,7 +2680,7 @@ public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Durati InputStream avroInputStream = response.getValue(); BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); - InputStream resultStream = reader.readInputStream(avroInputStream); + InputStream resultStream = reader.readInputStream2(avroInputStream); OutputStream outputStream = queryOptions.getOutputStream(); byte[] buffer = new byte[4096]; int bytesRead; From 9f1486744733533e8043a78e8f0595c50fa2a0c8 Mon Sep 17 00:00:00 2001 From: Rabab Date: Mon, 26 Aug 2024 11:15:12 -0700 Subject: [PATCH 34/45] debugging --- .../azure/storage/blob/implementation/util/BlobQueryReader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index 006c44263861a..f0ef0d4961321 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -166,6 +166,7 @@ private byte[] serializeAvroObjectsToBytes(Iterable avroObjects) { buffer.clear(); // Prepare buffer for next iteration if reusing } } catch (IOException e) { + System.out.println("Error occurred while serializing AvroObjects to bytes: " + e.getMessage()); throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); } } From 3efde0f08d18749028d7b31037a157d3c7d8f518 Mon Sep 17 00:00:00 2001 From: Rabab Date: Mon, 26 Aug 2024 12:09:53 -0700 Subject: [PATCH 35/45] changed fatalQueryError test case to handle exception thrown earlier --- .../storage/blob/implementation/util/BlobQueryReader.java | 1 - .../com/azure/storage/blob/specialized/BlobBaseApiTests.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index f0ef0d4961321..006c44263861a 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -166,7 +166,6 @@ private byte[] serializeAvroObjectsToBytes(Iterable avroObjects) { buffer.clear(); // Prepare buffer for next iteration if reusing } } catch (IOException e) { - System.out.println("Error occurred while serializing AvroObjects to bytes: " + e.getMessage()); throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java index 5a512b5252cfd..605603168b484 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java @@ -521,8 +521,9 @@ public void queryFatalError() { liveTestScenarioWithRetry(() -> { /* Input Stream. */ - InputStream qqStream = bc.openQueryInputStreamWithResponse(options).getValue(); - assertThrows(Throwable.class, () -> readFromInputStream(qqStream, Constants.KB)); + //InputStream qqStream = bc.openQueryInputStreamWithResponse(options).getValue(); + //assertThrows(Throwable.class, () -> readFromInputStream(qqStream, Constants.KB)); + assertThrows(Throwable.class, () -> bc.openQueryInputStreamWithResponse(options).getValue()); /* Output Stream. */ //Exceptions.ReactiveException.class From 3636759c83bbedc1655577d352c77605b6004636 Mon Sep 17 00:00:00 2001 From: Rabab Date: Mon, 26 Aug 2024 14:25:10 -0700 Subject: [PATCH 36/45] changing queryFatalError test to expect UncheckedIOException --- .../storage/blob/implementation/util/BlobQueryReader.java | 4 ++-- .../com/azure/storage/blob/specialized/BlobBaseApiTests.java | 5 ++--- .../java/com/azure/storage/file/datalake/FileApiTest.java | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index 006c44263861a..9d5321e059dc1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -48,7 +48,7 @@ */ public class BlobQueryReader { - private final ClientLogger LOGGER = new ClientLogger(BlobQueryReader.class); + private static final ClientLogger LOGGER = new ClientLogger(BlobQueryReader.class); private final Flux avro; private final Consumer progressConsumer; private final Consumer errorConsumer; @@ -149,7 +149,7 @@ private byte[] serializeAvroObjectsToBytes(Iterable avroObjects) { try { Object potentialMap = avroObject.getObject(); if (!(potentialMap instanceof Map)) { - throw new IllegalArgumentException("Expected object to be of type Map"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException("Expected object to be of type Map")); } Map recordMap = (Map) potentialMap; // Safely cast it to a Map ByteBuffer buffer = parseSyncRecord(recordMap); // Use the Map directly diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java index 605603168b484..1c7a8473bbc29 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java @@ -35,6 +35,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.io.UncheckedIOException; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; @@ -521,9 +522,7 @@ public void queryFatalError() { liveTestScenarioWithRetry(() -> { /* Input Stream. */ - //InputStream qqStream = bc.openQueryInputStreamWithResponse(options).getValue(); - //assertThrows(Throwable.class, () -> readFromInputStream(qqStream, Constants.KB)); - assertThrows(Throwable.class, () -> bc.openQueryInputStreamWithResponse(options).getValue()); + assertThrows(UncheckedIOException.class, () -> bc.openQueryInputStreamWithResponse(options).getValue()); /* Output Stream. */ //Exceptions.ReactiveException.class diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java index 696a3a6c9d50b..718003dad4e9b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java @@ -2976,9 +2976,8 @@ public void queryFatalError() { String expression = "SELECT * from BlobStorage"; liveTestScenarioWithRetry(() -> { - InputStream qqStream = fc.openQueryInputStreamWithResponse(new FileQueryOptions(expression) - .setInputSerialization(new FileQueryJsonSerialization())).getValue(); - assertThrows(UncheckedIOException.class, () -> readFromInputStream(qqStream, Constants.KB)); + assertThrows(UncheckedIOException.class, () -> fc.openQueryInputStreamWithResponse( + new FileQueryOptions(expression).setInputSerialization(new FileQueryJsonSerialization())).getValue()); assertThrows(RuntimeException.class, () -> fc.queryWithResponse(new FileQueryOptions(expression, new ByteArrayOutputStream()).setInputSerialization(new FileQueryJsonSerialization()), null, null)); From 05190905e5537afc72803aa2a13e38a41ef849d7 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 3 Sep 2024 12:06:36 -0700 Subject: [PATCH 37/45] updating files --- .../azure/storage/blob/implementation/util/ModelHelper.java | 4 ++-- .../azure/storage/blob/specialized/AppendBlobAsyncClient.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java index 72a7985b3067c..622bc90bc7ba1 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ModelHelper.java @@ -701,7 +701,7 @@ public static Callable wrapTimeoutServiceCallWithExceptionMapping(Supplie try { return serviceCall.get(); } catch (BlobStorageExceptionInternal internal) { - throw (BlobStorageException) mapToBlobStorageException(internal); + throw mapToBlobStorageException(internal); } }; } @@ -710,7 +710,7 @@ public static T wrapServiceCallWithExceptionMapping(Supplier serviceCall) try { return serviceCall.get(); } catch (BlobStorageExceptionInternal internal) { - throw (BlobStorageException) mapToBlobStorageException(internal); + throw mapToBlobStorageException(internal); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java index 0d9a4fc55a328..c9a955866bb65 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java @@ -22,6 +22,7 @@ import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AppendBlobItem; import com.azure.storage.blob.models.AppendBlobRequestConditions; import com.azure.storage.blob.models.BlobHttpHeaders; From 950f7ad76615d3bca2411fe68daea09221f27c71 Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 3 Sep 2024 13:58:34 -0700 Subject: [PATCH 38/45] regenerating swagger files --- .../blob/implementation/AppendBlobsImpl.java | 138 ++-- .../blob/implementation/BlobsImpl.java | 666 ++++++++++++------ .../blob/implementation/BlockBlobsImpl.java | 224 +++--- .../blob/implementation/ContainersImpl.java | 468 ++++++++---- .../blob/implementation/PageBlobsImpl.java | 306 +++++--- .../blob/implementation/ServicesImpl.java | 283 +++++--- 6 files changed, 1370 insertions(+), 715 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java index 47c4c45a1adea..eefcbfced4a74 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java @@ -1048,7 +1048,7 @@ public Mono> createNoCustomHeadersWithResponseAsync(String contai /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1150,17 +1150,21 @@ public ResponseBase createWithResponse(String co = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, - contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, - contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, legalHold, accept, context); + try { + return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, + contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1207,7 +1211,7 @@ public void create(String containerName, String blob, long contentLength, Intege /** * The Create Append Blob operation creates a new append blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1309,12 +1313,16 @@ public Response createNoCustomHeadersWithResponse(String containerName, St = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, - contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, - leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, legalHold, accept, context); + try { + return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + contentLength, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, + metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2189,7 +2197,7 @@ public Mono> appendBlockNoCustomHeadersWithResponseAsync(String c * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2259,18 +2267,22 @@ public ResponseBase appendBlockWithResponse = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlockSync(this.client.getUrl(), containerName, blob, comp, timeout, contentLength, - transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, - context); + try { + return service.appendBlockSync(this.client.getUrl(), containerName, blob, comp, timeout, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, appendPosition, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, + accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2318,7 +2330,7 @@ public void appendBlock(String containerName, String blob, long contentLength, B * The Append Block operation commits a new block of data to the end of an existing append blob. The Append Block * operation is permitted only if the blob was created with x-ms-blob-type set to AppendBlob. Append Block is * supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2388,11 +2400,15 @@ public Response appendBlockNoCustomHeadersWithResponse(String containerNam = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.appendBlockNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, - appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, body, accept, context); + try { + return service.appendBlockNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, leaseId, maxSize, + appendPosition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2939,7 +2955,7 @@ public Mono> appendBlockFromUrlNoCustomHeadersWithResponseAsync(S * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -3027,19 +3043,24 @@ public ResponseBase appendBlockFromU = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrlSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, sourceRange, - sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, - transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + try { + return service.appendBlockFromUrlSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -3103,7 +3124,7 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU * The Append Block operation commits a new block of data to the end of an existing append blob where the contents * are read from a source url. The Append Block operation is permitted only if the blob was created with * x-ms-blob-type set to AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -3191,12 +3212,17 @@ public Response appendBlockFromUrlNoCustomHeadersWithResponse(String conta = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.appendBlockFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, sourceUrl, - sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, - transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + try { + return service.appendBlockFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, contentLength, + transactionalContentMD5Converted, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, leaseId, maxSize, appendPosition, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, copySourceAuthorization, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3455,7 +3481,7 @@ public Mono> sealNoCustomHeadersWithResponseAsync(String containe /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3490,15 +3516,19 @@ public ResponseBase sealWithResponse(String contai = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.sealSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), - requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - appendPosition, accept, context); + try { + return service.sealSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), + requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + appendPosition, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3532,7 +3562,7 @@ public void seal(String containerName, String blob, Integer timeout, String requ /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12-12 * version or later. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3567,8 +3597,12 @@ public Response sealNoCustomHeadersWithResponse(String containerName, Stri = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.sealNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, appendPosition, accept, context); + try { + return service.sealNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, appendPosition, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java index 6617de68ac62c..7e9b7354bc7d3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java @@ -1906,7 +1906,7 @@ public Mono downloadNoCustomHeadersWithResponseAsync(String cont /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -1965,16 +1965,20 @@ public ResponseBase downloadWithResponse(Stri = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.downloadSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, - leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, encryptionAlgorithm, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.downloadSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, + leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -2012,15 +2016,19 @@ public InputStream download(String containerName, String blob, String snapshot, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) { - return downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId, - rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - requestId, cpkInfo, Context.NONE).getValue(); + try { + return downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId, + rangeGetContentMD5, rangeGetContentCRC64, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, + ifTags, requestId, cpkInfo, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Download operation reads or downloads a blob from the system, including its metadata and properties. You can * also call Download to read a snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -2079,10 +2087,14 @@ public Response downloadNoCustomHeadersWithResponse(String containe = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.downloadNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, - timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, - encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.downloadNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, encryptionKey, encryptionKeySha256, + encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2429,7 +2441,7 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -2483,16 +2495,20 @@ public ResponseBase getPropertiesWithResponse(S = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPropertiesSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, - leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, - context); + try { + return service.getPropertiesSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -2530,7 +2546,7 @@ public void getProperties(String containerName, String blob, String snapshot, St /** * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -2584,10 +2600,14 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, - timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, - context); + try { + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, + versionId, timeout, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2987,7 +3007,7 @@ public Mono> deleteNoCustomHeadersWithResponseAsync(String contai * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -3030,9 +3050,13 @@ public ResponseBase deleteWithResponse(String containe = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, - deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobDeleteType, accept, context); + try { + return service.deleteSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, + deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobDeleteType, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3051,7 +3075,7 @@ public ResponseBase deleteWithResponse(String containe * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -3107,7 +3131,7 @@ public void delete(String containerName, String blob, String snapshot, String ve * 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. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -3150,9 +3174,13 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, St = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, - timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context); + try { + return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, + timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3309,7 +3337,7 @@ public Mono> undeleteNoCustomHeadersWithResponseAsync(String cont /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3328,13 +3356,17 @@ public ResponseBase undeleteWithResponse(String cont Integer timeout, String requestId, Context context) { final String comp = "undelete"; final String accept = "application/xml"; - return service.undeleteSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), - requestId, accept, context); + try { + return service.undeleteSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3353,7 +3385,7 @@ public void undelete(String containerName, String blob, Integer timeout, String /** * Undelete a blob that was previously soft deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3372,8 +3404,12 @@ public Response undeleteNoCustomHeadersWithResponse(String containerName, String requestId, Context context) { final String comp = "undelete"; final String accept = "application/xml"; - return service.undeleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, accept, context); + try { + return service.undeleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3543,7 +3579,7 @@ public Mono> setExpiryNoCustomHeadersWithResponseAsync(String con /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. @@ -3564,13 +3600,17 @@ public ResponseBase setExpiryWithResponse(String co BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { final String comp = "expiry"; final String accept = "application/xml"; - return service.setExpirySync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), - requestId, expiryOptions, expiresOn, accept, context); + try { + return service.setExpirySync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. @@ -3592,7 +3632,7 @@ public void setExpiry(String containerName, String blob, BlobExpiryOptions expir /** * Sets the time a blob will expire and be deleted. - * + * * @param containerName The container name. * @param blob The blob name. * @param expiryOptions Required. Indicates mode of the expiry time. @@ -3613,8 +3653,12 @@ public Response setExpiryNoCustomHeadersWithResponse(String containerName, BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn, Context context) { final String comp = "expiry"; final String accept = "application/xml"; - return service.setExpiryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context); + try { + return service.setExpiryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, expiryOptions, expiresOn, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3984,7 +4028,7 @@ public Mono> setHttpHeadersNoCustomHeadersWithResponseAsync(Strin /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4049,15 +4093,19 @@ public ResponseBase setHttpHeadersWithResponse = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHttpHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, - contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(), - requestId, accept, context); + try { + return service.setHttpHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4088,7 +4136,7 @@ public void setHttpHeaders(String containerName, String blob, Integer timeout, S /** * The Set HTTP Headers operation sets system properties on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4152,10 +4200,14 @@ public Response setHttpHeadersNoCustomHeadersWithResponse(String container = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setHttpHeadersNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, - this.client.getVersion(), requestId, accept, context); + try { + return service.setHttpHeadersNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + cacheControl, contentType, contentMd5Converted, contentEncoding, contentLanguage, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, contentDisposition, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -4365,7 +4417,7 @@ public Mono> setImmutabilityPolicyNoCustomHeadersWithResponseAsyn /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4393,14 +4445,18 @@ public ResponseBase setImmutabilityPoli = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.setImmutabilityPolicySync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, accept, context); + try { + return service.setImmutabilityPolicySync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4426,7 +4482,7 @@ public void setImmutabilityPolicy(String containerName, String blob, Integer tim /** * The Set Immutability Policy operation sets the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4454,9 +4510,13 @@ public Response setImmutabilityPolicyNoCustomHeadersWithResponse(String co = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.setImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, accept, context); + try { + return service.setImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -4614,7 +4674,7 @@ public Mono> deleteImmutabilityPolicyNoCustomHeadersWithResponseA /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4633,13 +4693,17 @@ public ResponseBase deleteImmutabili String containerName, String blob, Integer timeout, String requestId, Context context) { final String comp = "immutabilityPolicies"; final String accept = "application/xml"; - return service.deleteImmutabilityPolicySync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, accept, context); + try { + return service.deleteImmutabilityPolicySync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4658,7 +4722,7 @@ public void deleteImmutabilityPolicy(String containerName, String blob, Integer /** * The Delete Immutability Policy operation deletes the immutability policy on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4677,8 +4741,12 @@ public Response deleteImmutabilityPolicyNoCustomHeadersWithResponse(String Integer timeout, String requestId, Context context) { final String comp = "immutabilityPolicies"; final String accept = "application/xml"; - return service.deleteImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - timeout, this.client.getVersion(), requestId, accept, context); + try { + return service.deleteImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + timeout, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -4842,7 +4910,7 @@ public Mono> setLegalHoldNoCustomHeadersWithResponseAsync(String /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -4862,13 +4930,17 @@ public ResponseBase setLegalHoldWithResponse(Str boolean legalHold, Integer timeout, String requestId, Context context) { final String comp = "legalhold"; final String accept = "application/xml"; - return service.setLegalHoldSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, legalHold, accept, context); + try { + return service.setLegalHoldSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -4888,7 +4960,7 @@ public void setLegalHold(String containerName, String blob, boolean legalHold, I /** * The Set Legal Hold operation sets a legal hold on the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param legalHold Specified if a legal hold should be set on the blob. @@ -4908,8 +4980,12 @@ public Response setLegalHoldNoCustomHeadersWithResponse(String containerNa Integer timeout, String requestId, Context context) { final String comp = "legalhold"; final String accept = "application/xml"; - return service.setLegalHoldNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, legalHold, accept, context); + try { + return service.setLegalHoldNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -5287,7 +5363,7 @@ public Mono> setMetadataNoCustomHeadersWithResponseAsync(String c /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value * pairs. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -5348,16 +5424,20 @@ public ResponseBase setMetadataWithResponse(Strin = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadataSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, - context); + try { + return service.setMetadataSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value * pairs. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -5396,7 +5476,7 @@ public void setMetadata(String containerName, String blob, Integer timeout, Map< /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-value * pairs. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -5457,10 +5537,14 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + metadata, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -5769,14 +5853,18 @@ public ResponseBase acquireLeaseWithResponse(Str = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, - proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.acquireLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, duration, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -5811,7 +5899,7 @@ public void acquireLease(String containerName, String blob, Integer timeout, Int /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -5849,14 +5937,18 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, - duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - ifTags, this.client.getVersion(), requestId, accept, context); + try { + return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, + timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6122,14 +6214,18 @@ public ResponseBase releaseLeaseWithResponse(Str = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.releaseLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6159,7 +6255,7 @@ public void releaseLease(String containerName, String blob, String leaseId, Inte /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6192,14 +6288,18 @@ public Response releaseLeaseNoCustomHeadersWithResponse(String containerNa = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, - leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6465,14 +6565,18 @@ public ResponseBase renewLeaseWithResponse(String = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.renewLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6502,7 +6606,7 @@ public void renewLease(String containerName, String blob, String leaseId, Intege /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6535,14 +6639,18 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, - leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6832,14 +6940,18 @@ public ResponseBase changeLeaseWithResponse(Strin = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, - proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.changeLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6872,7 +6984,7 @@ public void changeLease(String containerName, String blob, String leaseId, Strin /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param leaseId Specifies the current lease ID on the resource. @@ -6908,14 +7020,18 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, - leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - ifTags, this.client.getVersion(), requestId, accept, context); + try { + return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, + timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -7179,7 +7295,7 @@ public Mono> breakLeaseNoCustomHeadersWithResponseAsync(String co /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -7217,14 +7333,18 @@ public ResponseBase breakLeaseWithResponse(String = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.breakLeaseSync(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -7259,7 +7379,7 @@ public void breakLease(String containerName, String blob, Integer timeout, Integ /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operations. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -7297,9 +7417,13 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, timeout, - breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, action, + timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -7671,7 +7795,7 @@ public Mono> createSnapshotNoCustomHeadersWithResponseAsync(Strin /** * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -7732,15 +7856,19 @@ public ResponseBase createSnapshotWithResponse = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshotSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId, - accept, context); + try { + return service.createSnapshotSync(this.client.getUrl(), containerName, blob, comp, timeout, metadata, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, this.client.getVersion(), requestId, + accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -7778,7 +7906,7 @@ public void createSnapshot(String containerName, String blob, Integer timeout, M /** * The Create Snapshot operation creates a read-only snapshot of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -7839,10 +7967,14 @@ public Response createSnapshotNoCustomHeadersWithResponse(String container = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.createSnapshotNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, - this.client.getVersion(), requestId, accept, context); + try { + return service.createSnapshotNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + metadata, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, leaseId, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -8273,7 +8405,7 @@ public Mono> startCopyFromURLNoCustomHeadersWithResponseAsync(Str /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -8338,16 +8470,20 @@ public ResponseBase startCopyFromURLWithResp = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.startCopyFromURLSync(this.client.getUrl(), containerName, blob, timeout, metadata, tier, - rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + try { + return service.startCopyFromURLSync(this.client.getUrl(), containerName, blob, timeout, metadata, tier, + rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -8406,7 +8542,7 @@ public void startCopyFromURL(String containerName, String blob, String copySourc /** * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -8471,11 +8607,15 @@ public Response startCopyFromURLNoCustomHeadersWithResponse(String contain = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.startCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, timeout, metadata, - tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, - ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, sealBlob, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + try { + return service.startCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, timeout, + metadata, tier, rehydratePriority, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, sourceIfTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, blobTagsString, + sealBlob, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -8967,7 +9107,7 @@ public Mono> copyFromURLNoCustomHeadersWithResponseAsync(String c /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -9042,18 +9182,22 @@ public ResponseBase copyFromURLWithResponse(Strin String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.copyFromURLSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, metadata, - tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, leaseId, - this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, - encryptionScope, copySourceTags, accept, context); + try { + return service.copyFromURLSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, timeout, + metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, + sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, + encryptionScope, copySourceTags, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -9117,7 +9261,7 @@ public void copyFromURL(String containerName, String blob, String copySource, In /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a response * until the copy is complete. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -9192,12 +9336,16 @@ public Response copyFromURLNoCustomHeadersWithResponse(String containerNam String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.copyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, - timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, - sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - copySource, leaseId, this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, copySourceAuthorization, - encryptionScope, copySourceTags, accept, context); + try { + return service.copyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, xMsRequiresSync, + timeout, metadata, tier, sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, + sourceIfMatch, sourceIfNoneMatch, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, + ifNoneMatch, ifTags, copySource, leaseId, this.client.getVersion(), requestId, + sourceContentMD5Converted, blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, + legalHold, copySourceAuthorization, encryptionScope, copySourceTags, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -9378,7 +9526,7 @@ public Mono> abortCopyFromURLNoCustomHeadersWithResponseAsync(Str /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. @@ -9400,14 +9548,19 @@ public ResponseBase abortCopyFromURLWithResp final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String accept = "application/xml"; - return service.abortCopyFromURLSync(this.client.getUrl(), containerName, blob, comp, copyActionAbortConstant, - copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + try { + return service.abortCopyFromURLSync(this.client.getUrl(), containerName, blob, comp, + copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. @@ -9430,7 +9583,7 @@ public void abortCopyFromURL(String containerName, String blob, String copyId, I /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with * zero length and full metadata. - * + * * @param containerName The container name. * @param blob The blob name. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. @@ -9452,8 +9605,13 @@ public Response abortCopyFromURLNoCustomHeadersWithResponse(String contain final String comp = "copy"; final String copyActionAbortConstant = "abort"; final String accept = "application/xml"; - return service.abortCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, context); + try { + return service.abortCopyFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + copyActionAbortConstant, copyId, timeout, leaseId, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -9702,7 +9860,7 @@ public Mono> setTierNoCustomHeadersWithResponseAsync(String conta * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -9732,8 +9890,12 @@ public ResponseBase setTierWithResponse(String contai String requestId, String leaseId, String ifTags, Context context) { final String comp = "tier"; final String accept = "application/xml"; - return service.setTierSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, tier, - rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + try { + return service.setTierSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, timeout, + tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -9741,7 +9903,7 @@ public ResponseBase setTierWithResponse(String contai * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -9775,7 +9937,7 @@ public void setTier(String containerName, String blob, AccessTier tier, String s * account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's * tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines * Hot/Cool/Archive storage type. This operation does not update the blob's ETag. - * + * * @param containerName The container name. * @param blob The blob name. * @param tier Indicates the tier to be set on the blob. @@ -9805,8 +9967,13 @@ public Response setTierNoCustomHeadersWithResponse(String containerName, S String leaseId, String ifTags, Context context) { final String comp = "tier"; final String accept = "application/xml"; - return service.setTierNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, - timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, accept, context); + try { + return service.setTierNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + versionId, timeout, tier, rehydratePriority, this.client.getVersion(), requestId, leaseId, ifTags, + accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -9935,7 +10102,7 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Strin /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. * @param context The context to associate with this operation. @@ -9950,13 +10117,17 @@ public ResponseBase getAccountInfoWithResponse final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoSync(this.client.getUrl(), containerName, blob, restype, comp, - this.client.getVersion(), accept, context); + try { + return service.getAccountInfoSync(this.client.getUrl(), containerName, blob, restype, comp, + this.client.getVersion(), accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -9970,7 +10141,7 @@ public void getAccountInfo(String containerName, String blob) { /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param blob The blob name. * @param context The context to associate with this operation. @@ -9985,8 +10156,12 @@ public Response getAccountInfoNoCustomHeadersWithResponse(String container final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, blob, restype, comp, - this.client.getVersion(), accept, context); + try { + return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, blob, restype, comp, + this.client.getVersion(), accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -10324,7 +10499,7 @@ public Mono queryNoCustomHeadersWithResponseAsync(String contain /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -10378,15 +10553,19 @@ public ResponseBase queryWithResponse(String con = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.querySync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, - accept, context); + try { + return service.querySync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + queryRequest, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -10417,13 +10596,18 @@ public ResponseBase queryWithResponse(String con public InputStream query(String containerName, String blob, String snapshot, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, QueryRequest queryRequest, CpkInfo cpkInfo) { - return queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, Context.NONE).getValue(); + try { + return queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, Context.NONE) + .getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Query operation enables users to select/project on blob data by providing simple query expressions. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -10477,10 +10661,14 @@ public Response queryNoCustomHeadersWithResponse(String containerNa = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.queryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, - leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, queryRequest, - accept, context); + try { + return service.queryNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + queryRequest, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -10688,7 +10876,7 @@ public Mono> getTagsNoCustomHeadersWithResponseAsync(String c /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -10716,13 +10904,17 @@ public ResponseBase getTagsWithResponse(String co Context context) { final String comp = "tags"; final String accept = "application/xml"; - return service.getTagsSync(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), - requestId, snapshot, versionId, ifTags, leaseId, accept, context); + try { + return service.getTagsSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -10746,13 +10938,17 @@ public ResponseBase getTagsWithResponse(String co @ServiceMethod(returns = ReturnType.SINGLE) public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId) { - return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, - Context.NONE).getValue(); + try { + return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, + Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Get Tags operation enables users to get the tags associated with a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -10779,8 +10975,12 @@ public Response getTagsNoCustomHeadersWithResponse(String containerNam String requestId, String snapshot, String versionId, String ifTags, String leaseId, Context context) { final String comp = "tags"; final String accept = "application/xml"; - return service.getTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + try { + return service.getTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -11000,7 +11200,7 @@ public Mono> setTagsNoCustomHeadersWithResponseAsync(String conta /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -11029,14 +11229,18 @@ public ResponseBase setTagsWithResponse(String contai final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.setTagsSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, - versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, - tags, accept, context); + try { + return service.setTagsSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), + timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, + ifTags, leaseId, tags, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -11065,7 +11269,7 @@ public void setTags(String containerName, String blob, Integer timeout, String v /** * The Set Tags operation enables users to set tags on a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -11094,8 +11298,12 @@ public Response setTagsNoCustomHeadersWithResponse(String containerName, S final String accept = "application/xml"; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.setTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, - transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context); + try { + return service.setTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, + transactionalContentCrc64Converted, requestId, ifTags, leaseId, tags, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java index 05f4d816220cc..0015e15e74b03 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java @@ -2014,7 +2014,7 @@ public Mono> uploadNoCustomHeadersWithResponseAsync(String contai * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2123,13 +2123,17 @@ public ResponseBase uploadWithResponse(String con DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.uploadSync(this.client.getUrl(), containerName, blob, blobType, timeout, - transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, - contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, - blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, - transactionalContentCrc64Converted, body, accept, context); + try { + return service.uploadSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2137,7 +2141,7 @@ public ResponseBase uploadWithResponse(String con * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2193,7 +2197,7 @@ public void upload(String containerName, String blob, long contentLength, Binary * overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the * existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a * block blob, use the Put Block List operation. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2302,13 +2306,17 @@ public Response uploadNoCustomHeadersWithResponse(String containerName, St DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.uploadNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, - transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, - contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, - blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, - transactionalContentCrc64Converted, body, accept, context); + try { + return service.uploadNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, + transactionalContentCrc64Converted, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3036,7 +3044,7 @@ public Mono> putBlobFromUrlNoCustomHeadersWithResponseAsync(Strin * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -3160,14 +3168,18 @@ public ResponseBase putBlobFromUrlWithRes DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return service.putBlobFromUrlSync(this.client.getUrl(), containerName, blob, blobType, timeout, - transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, - contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), - requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, - copySourceAuthorization, copySourceTags, accept, context); + try { + return service.putBlobFromUrlSync(this.client.getUrl(), containerName, blob, blobType, timeout, + transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, copySource, + copySourceBlobProperties, copySourceAuthorization, copySourceTags, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3176,7 +3188,7 @@ public ResponseBase putBlobFromUrlWithRes * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -3248,7 +3260,7 @@ public void putBlobFromUrl(String containerName, String blob, long contentLength * from URL; the content of an existing blob is overwritten with the content of the new blob. To perform partial * updates to a block blob's contents using a source URL, use the Put Block from URL API in conjunction with Put * Block List. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -3372,14 +3384,18 @@ public Response putBlobFromUrlNoCustomHeadersWithResponse(String container DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); String sourceContentMD5Converted = Base64Util.encodeToString(sourceContentMD5); - return service.putBlobFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, - transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, - contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, this.client.getVersion(), - requestId, sourceContentMD5Converted, blobTagsString, copySource, copySourceBlobProperties, - copySourceAuthorization, copySourceTags, accept, context); + try { + return service.putBlobFromUrlNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, + timeout, transactionalContentMD5Converted, contentLength, contentType, contentEncoding, contentLanguage, + contentMd5Converted, cacheControl, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSinceConverted, + sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, sourceIfTags, + this.client.getVersion(), requestId, sourceContentMD5Converted, blobTagsString, copySource, + copySourceBlobProperties, copySourceAuthorization, copySourceTags, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -4026,7 +4042,7 @@ public Mono> stageBlockNoCustomHeadersWithResponseAsync(String co /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -4079,15 +4095,19 @@ public ResponseBase stageBlockWithResponse(St String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlockSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, - transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), requestId, body, - accept, context); + try { + return service.stageBlockSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), requestId, body, + accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -4119,7 +4139,7 @@ public void stageBlock(String containerName, String blob, String blockId, long c /** * The Stage Block operation creates a new block to be committed as part of a blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -4172,10 +4192,14 @@ public Response stageBlockNoCustomHeadersWithResponse(String containerName String encryptionScope = encryptionScopeInternal; String transactionalContentMD5Converted = Base64Util.encodeToString(transactionalContentMD5); String transactionalContentCrc64Converted = Base64Util.encodeToString(transactionalContentCrc64); - return service.stageBlockNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, - contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), - requestId, body, accept, context); + try { + return service.stageBlockNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), + requestId, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -4599,7 +4623,7 @@ public Mono> stageBlockFromURLNoCustomHeadersWithResponseAsync(St /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -4667,17 +4691,21 @@ public ResponseBase stageBlockFromURLW = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURLSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, - sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, sourceIfModifiedSinceConverted, - sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, this.client.getVersion(), requestId, - copySourceAuthorization, accept, context); + try { + return service.stageBlockFromURLSync(this.client.getUrl(), containerName, blob, comp, blockId, + contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -4724,7 +4752,7 @@ public void stageBlockFromURL(String containerName, String blob, String blockId, /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from * a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less @@ -4792,11 +4820,15 @@ public Response stageBlockFromURLNoCustomHeadersWithResponse(String contai = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.stageBlockFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, - contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, timeout, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, - sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + try { + return service.stageBlockFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + blockId, contentLength, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, + timeout, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -5429,7 +5461,7 @@ public Mono> commitBlockListNoCustomHeadersWithResponseAsync(Stri * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -5537,13 +5569,17 @@ public ResponseBase commitBlockListWithR = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.commitBlockListSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, - contentType, contentEncoding, contentLanguage, contentMd5Converted, transactionalContentMD5Converted, - transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, - blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, - context); + try { + return service.commitBlockListSync(this.client.getUrl(), containerName, blob, comp, timeout, cacheControl, + contentType, contentEncoding, contentLanguage, contentMd5Converted, transactionalContentMD5Converted, + transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, + blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -5553,7 +5589,7 @@ public ResponseBase commitBlockListWithR * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -5610,7 +5646,7 @@ public void commitBlockList(String containerName, String blob, BlockLookupList b * committing the new and existing blocks together. You can do this by specifying whether to commit a block from the * committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the * block, whichever list it may belong to. - * + * * @param containerName The container name. * @param blob The blob name. * @param blocks Blob Blocks. @@ -5718,13 +5754,17 @@ public Response commitBlockListNoCustomHeadersWithResponse(String containe = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.commitBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, - transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, contentDisposition, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, - blobTagsString, immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, blocks, accept, - context); + try { + return service.commitBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + cacheControl, contentType, contentEncoding, contentLanguage, contentMd5Converted, + transactionalContentMD5Converted, transactionalContentCrc64Converted, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, tier, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, + immutabilityPolicyMode, legalHold, blocks, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -5933,7 +5973,7 @@ public Mono> getBlockListNoCustomHeadersWithResponseAsync(St /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both @@ -5961,13 +6001,17 @@ public ResponseBase getBlockListWithRe String requestId, Context context) { final String comp = "blocklist"; final String accept = "application/xml"; - return service.getBlockListSync(this.client.getUrl(), containerName, blob, comp, snapshot, listType, timeout, - leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + try { + return service.getBlockListSync(this.client.getUrl(), containerName, blob, comp, snapshot, listType, + timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both @@ -5991,13 +6035,17 @@ public ResponseBase getBlockListWithRe @ServiceMethod(returns = ReturnType.SINGLE) public BlockList getBlockList(String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, String ifTags, String requestId) { - return getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, requestId, - Context.NONE).getValue(); + try { + return getBlockListWithResponse(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, + requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both @@ -6025,7 +6073,11 @@ public Response getBlockListNoCustomHeadersWithResponse(String contai Context context) { final String comp = "blocklist"; final String accept = "application/xml"; - return service.getBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, - listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + try { + return service.getBlockListNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + listType, timeout, leaseId, ifTags, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java index 009eff6fad776..98c26465d2b8c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java @@ -1190,7 +1190,7 @@ public Mono> createNoCustomHeadersWithResponseAsync(String contai /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1228,15 +1228,19 @@ public ResponseBase createWithResponse(String con = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); } Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return service.createSync(this.client.getUrl(), containerName, restype, timeout, metadata, access, - this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, - context); + try { + return service.createSync(this.client.getUrl(), containerName, restype, timeout, metadata, access, + this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1265,7 +1269,7 @@ public void create(String containerName, Integer timeout, Map me /** * creates a new container under the specified account. If the container with the same name already exists, the * operation fails. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1303,9 +1307,13 @@ public Response createNoCustomHeadersWithResponse(String containerName, In = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); } Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, metadata, - access, this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, - accept, context); + try { + return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, metadata, + access, this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, + accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -1469,7 +1477,7 @@ public Mono> getPropertiesNoCustomHeadersWithResponseAsync(String /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1488,14 +1496,18 @@ public ResponseBase getPropertiesWithRespo Integer timeout, String leaseId, String requestId, Context context) { final String restype = "container"; final String accept = "application/xml"; - return service.getPropertiesSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - this.client.getVersion(), requestId, accept, context); + try { + return service.getPropertiesSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1515,7 +1527,7 @@ public void getProperties(String containerName, Integer timeout, String leaseId, /** * returns all user-defined metadata and system properties for the specified container. The data returned does not * include the container's list of blobs. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1534,8 +1546,12 @@ public Response getPropertiesNoCustomHeadersWithResponse(String containerN String leaseId, String requestId, Context context) { final String restype = "container"; final String accept = "application/xml"; - return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - this.client.getVersion(), requestId, accept, context); + try { + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, + leaseId, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -1742,7 +1758,7 @@ public Mono> deleteNoCustomHeadersWithResponseAsync(String contai /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1770,14 +1786,19 @@ public ResponseBase deleteWithResponse(String con = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + try { + return service.deleteSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1803,7 +1824,7 @@ public void delete(String containerName, Integer timeout, String leaseId, Offset /** * operation marks the specified container for deletion. The container and any blobs contained within it are later * deleted during garbage collection. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1830,8 +1851,13 @@ public Response deleteNoCustomHeadersWithResponse(String containerName, In = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + try { + return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2053,7 +2079,7 @@ public Mono> setMetadataNoCustomHeadersWithResponseAsync(String c /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2084,13 +2110,17 @@ public ResponseBase setMetadataWithResponse( final String accept = "application/xml"; DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadataSync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, metadata, - ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + try { + return service.setMetadataSync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, + metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2118,7 +2148,7 @@ public void setMetadata(String containerName, Integer timeout, String leaseId, M /** * operation sets one or more user-defined name-value pairs for the specified container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2148,8 +2178,12 @@ public Response setMetadataNoCustomHeadersWithResponse(String containerNam final String accept = "application/xml"; DateTimeRfc1123 ifModifiedSinceConverted = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + try { + return service.setMetadataNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + leaseId, metadata, ifModifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2323,7 +2357,7 @@ public Mono> getAccessPolicyNoCustomHeader /** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed * publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2343,14 +2377,18 @@ public ResponseBase getAccessPolicyNoCustomHeadersWithR final String restype = "container"; final String comp = "acl"; final String accept = "application/xml"; - return service.getAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - leaseId, this.client.getVersion(), requestId, accept, context); + try { + return service.getAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + timeout, leaseId, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2630,7 +2676,7 @@ public Mono> setAccessPolicyNoCustomHeadersWithResponseAsync(Stri /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2662,15 +2708,19 @@ public ResponseBase setAccessPolicyWithR DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); - return service.setAccessPolicySync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - containerAclConverted, accept, context); + try { + return service.setAccessPolicySync(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, + access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + containerAclConverted, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2699,7 +2749,7 @@ public void setAccessPolicy(String containerName, Integer timeout, String leaseI /** * sets the permissions for the specified container. The permissions indicate whether blobs in a container may be * accessed publicly. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2731,9 +2781,13 @@ public Response setAccessPolicyNoCustomHeadersWithResponse(String containe DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); BlobSignedIdentifierWrapper containerAclConverted = new BlobSignedIdentifierWrapper(containerAcl); - return service.setAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - containerAclConverted, accept, context); + try { + return service.setAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + timeout, leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, containerAclConverted, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2916,7 +2970,7 @@ public Mono> restoreNoCustomHeadersWithResponseAsync(String conta /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2939,13 +2993,17 @@ public ResponseBase restoreWithResponse(String c final String restype = "container"; final String comp = "undelete"; final String accept = "application/xml"; - return service.restoreSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); + try { + return service.restoreSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2969,7 +3027,7 @@ public void restore(String containerName, Integer timeout, String requestId, Str /** * Restores a previously-deleted container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -2992,8 +3050,12 @@ public Response restoreNoCustomHeadersWithResponse(String containerName, I final String restype = "container"; final String comp = "undelete"; final String accept = "application/xml"; - return service.restoreNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); + try { + return service.restoreNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, deletedContainerName, deletedContainerVersion, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3167,7 +3229,7 @@ public Mono> renameNoCustomHeadersWithResponseAsync(String contai /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3189,13 +3251,17 @@ public ResponseBase renameWithResponse(String con final String restype = "container"; final String comp = "rename"; final String accept = "application/xml"; - return service.renameSync(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), - requestId, sourceContainerName, sourceLeaseId, accept, context); + try { + return service.renameSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3217,7 +3283,7 @@ public void rename(String containerName, String sourceContainerName, Integer tim /** * Renames an existing container. - * + * * @param containerName The container name. * @param sourceContainerName Required. Specifies the name of the container to rename. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -3239,8 +3305,12 @@ public Response renameNoCustomHeadersWithResponse(String containerName, St final String restype = "container"; final String comp = "rename"; final String accept = "application/xml"; - return service.renameNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context); + try { + return service.renameNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, sourceContainerName, sourceLeaseId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3599,7 +3669,7 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync(String c /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. @@ -3623,13 +3693,17 @@ public ResponseBase submitBatchWithRe final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchSync(this.client.getUrl(), containerName, restype, comp, contentLength, - multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + try { + return service.submitBatchSync(this.client.getUrl(), containerName, restype, comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. @@ -3648,13 +3722,17 @@ public ResponseBase submitBatchWithRe @ServiceMethod(returns = ReturnType.SINGLE) public InputStream submitBatch(String containerName, long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { - return submitBatchWithResponse(containerName, contentLength, multipartContentType, body, timeout, requestId, - Context.NONE).getValue(); + try { + return submitBatchWithResponse(containerName, contentLength, multipartContentType, body, timeout, requestId, + Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param containerName The container name. * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. @@ -3677,8 +3755,13 @@ public Response submitBatchNoCustomHeadersWithResponse(String conta final String restype = "container"; final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, contentLength, - multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + try { + return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + contentLength, multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3941,7 +4024,7 @@ public Mono> filterBlobsNoCustomHeadersWithResponseA /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -3978,14 +4061,18 @@ public ResponseBase filterBlobs : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.filterBlobsSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + try { + return service.filterBlobsSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -4012,14 +4099,18 @@ public ResponseBase filterBlobs @ServiceMethod(returns = ReturnType.SINGLE) public FilterBlobSegment filterBlobs(String containerName, Integer timeout, String requestId, String where, String marker, Integer maxresults, List include) { - return filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, include, - Context.NONE).getValue(); + try { + return filterBlobsWithResponse(containerName, timeout, requestId, where, marker, maxresults, include, + Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given search * expression. Filter blobs searches within the given container. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -4056,8 +4147,12 @@ public Response filterBlobsNoCustomHeadersWithResponse(String : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + try { + return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, timeout, + this.client.getVersion(), requestId, where, marker, maxresults, includeConverted, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -4345,15 +4440,19 @@ public ResponseBase acquireLeaseWithRespons = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, duration, - proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); + try { + return service.acquireLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, + duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -4384,7 +4483,7 @@ public void acquireLease(String containerName, Integer timeout, Integer duration /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -4419,15 +4518,19 @@ public Response acquireLeaseNoCustomHeadersWithResponse(String containerNa = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - this.client.getVersion(), requestId, accept, context); + try { + return service.acquireLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, duration, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4669,14 +4772,19 @@ public ResponseBase releaseLeaseWithRespons = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + try { + return service.releaseLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4702,7 +4810,7 @@ public void releaseLease(String containerName, String leaseId, Integer timeout, /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4731,15 +4839,19 @@ public Response releaseLeaseNoCustomHeadersWithResponse(String containerNa = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); + try { + return service.releaseLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -4981,14 +5093,19 @@ public ResponseBase renewLeaseWithResponse(St = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + try { + return service.renewLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -5014,7 +5131,7 @@ public void renewLease(String containerName, String leaseId, Integer timeout, Of /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -5043,15 +5160,19 @@ public Response renewLeaseNoCustomHeadersWithResponse(String containerName = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); + try { + return service.renewLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -5328,14 +5449,19 @@ public ResponseBase breakLeaseWithResponse(St = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, breakPeriod, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, context); + try { + return service.breakLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, + breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, + accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -5366,7 +5492,7 @@ public void breakLease(String containerName, Integer timeout, Integer breakPerio /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -5401,15 +5527,19 @@ public Response breakLeaseNoCustomHeadersWithResponse(String containerName = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), - requestId, accept, context); + try { + return service.breakLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, breakPeriod, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) @@ -5644,7 +5774,7 @@ public Mono> changeLeaseNoCustomHeadersWithResponseAsync(String c /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) @@ -5677,15 +5807,19 @@ public ResponseBase changeLeaseWithResponse( = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, - proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - accept, context); + try { + return service.changeLeaseSync(this.client.getUrl(), containerName, comp, restype, action, timeout, leaseId, + proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) @@ -5714,7 +5848,7 @@ public void changeLease(String containerName, String leaseId, String proposedLea /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 * seconds, or can be infinite. - * + * * @param containerName The container name. * @param leaseId Specifies the current lease ID on the resource. * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) @@ -5747,9 +5881,13 @@ public Response changeLeaseNoCustomHeadersWithResponse(String containerNam = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, - timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - this.client.getVersion(), requestId, accept, context); + try { + return service.changeLeaseNoCustomHeadersSync(this.client.getUrl(), containerName, comp, restype, action, + timeout, leaseId, proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -6041,13 +6179,17 @@ public Mono> listBlobFlatSegmentNoCustomH : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, - maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); + try { + return service.listBlobFlatSegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, marker, + maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next @@ -6074,13 +6216,17 @@ public Mono> listBlobFlatSegmentNoCustomH @ServiceMethod(returns = ReturnType.SINGLE) public ListBlobsFlatSegmentResponse listBlobFlatSegment(String containerName, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId) { - return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, timeout, requestId, - Context.NONE).getValue(); + try { + return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, timeout, + requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next @@ -6117,14 +6263,18 @@ public Response listBlobFlatSegmentNoCustomHeaders : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, - context); + try { + return service.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + prefix, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the @@ -6396,7 +6546,7 @@ public Mono> listBlobHierarchySegmen /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the @@ -6437,14 +6587,18 @@ public Mono> listBlobHierarchySegmen : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobHierarchySegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, - delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, - context); + try { + return service.listBlobHierarchySegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, + delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the @@ -6475,13 +6629,17 @@ public Mono> listBlobHierarchySegmen public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String containerName, String delimiter, String prefix, String marker, Integer maxresults, List include, Integer timeout, String requestId) { - return listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, - timeout, requestId, Context.NONE).getValue(); + try { + return listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, + timeout, requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container. - * + * * @param containerName The container name. * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix element in the * response body that acts as a placeholder for all blobs whose names begin with the same substring up to the @@ -6521,9 +6679,13 @@ public Response listBlobHierarchySegmentNoCus : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.listBlobHierarchySegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), requestId, - accept, context); + try { + return service.listBlobHierarchySegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, + comp, prefix, delimiter, marker, maxresults, includeConverted, timeout, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -6645,7 +6807,7 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Strin /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6659,13 +6821,17 @@ public ResponseBase getAccountInfoWithRes final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoSync(this.client.getUrl(), containerName, restype, comp, this.client.getVersion(), - accept, context); + try { + return service.getAccountInfoSync(this.client.getUrl(), containerName, restype, comp, + this.client.getVersion(), accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -6678,7 +6844,7 @@ public void getAccountInfo(String containerName) { /** * Returns the sku name and account kind. - * + * * @param containerName The container name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6691,7 +6857,11 @@ public Response getAccountInfoNoCustomHeadersWithResponse(String container final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - this.client.getVersion(), accept, context); + try { + return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, + this.client.getVersion(), accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java index 189ad49ce02df..24a25a6b8a70e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java @@ -1460,7 +1460,7 @@ public Mono> createNoCustomHeadersWithResponseAsync(String contai /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1568,17 +1568,21 @@ public ResponseBase createWithResponse(String cont = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, tier, - contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, - contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, - blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, immutabilityPolicyExpiryConverted, - immutabilityPolicyMode, legalHold, accept, context); + try { + return service.createSync(this.client.getUrl(), containerName, blob, blobType, timeout, contentLength, tier, + contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, metadata, leaseId, + contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, + blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1632,7 +1636,7 @@ public void create(String containerName, String blob, long contentLength, long b /** * The Create operation creates a new page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -1739,12 +1743,16 @@ public Response createNoCustomHeadersWithResponse(String containerName, St = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); DateTimeRfc1123 immutabilityPolicyExpiryConverted = immutabilityPolicyExpiry == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiry); - return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, - contentLength, tier, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, - metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, - encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + try { + return service.createNoCustomHeadersSync(this.client.getUrl(), containerName, blob, blobType, timeout, + contentLength, tier, contentType, contentEncoding, contentLanguage, contentMd5Converted, cacheControl, + metadata, leaseId, contentDisposition, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + blobContentLength, blobSequenceNumber, this.client.getVersion(), requestId, blobTagsString, + immutabilityPolicyExpiryConverted, immutabilityPolicyMode, legalHold, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2607,7 +2615,7 @@ public Mono> uploadPagesNoCustomHeadersWithResponseAsync(String c /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2678,16 +2686,21 @@ public ResponseBase uploadPagesWithResponse(S = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, - transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, body, accept, context); + try { + return service.uploadPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, + transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2734,7 +2747,7 @@ public void uploadPages(String containerName, String blob, long contentLength, B /** * The Upload Pages operation writes a range of pages to a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -2805,12 +2818,16 @@ public Response uploadPagesNoCustomHeadersWithResponse(String containerNam = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.uploadPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, - contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, - leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, body, accept, context); + try { + return service.uploadPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, range, + leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3209,7 +3226,7 @@ public Mono> clearPagesNoCustomHeadersWithResponseAsync(String co /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -3274,16 +3291,20 @@ public ResponseBase clearPagesWithResponse(Str = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, - timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.clearPagesSync(this.client.getUrl(), containerName, blob, comp, pageWrite, contentLength, + timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -3325,7 +3346,7 @@ public void clearPages(String containerName, String blob, long contentLength, In /** * The Clear Pages operation clears a set of pages from a page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param contentLength The length of the request. @@ -3390,11 +3411,15 @@ public Response clearPagesNoCustomHeadersWithResponse(String containerName = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.clearPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, - contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, - encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context); + try { + return service.clearPagesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, + contentLength, timeout, range, leaseId, encryptionKey, encryptionKeySha256, encryptionAlgorithm, + encryptionScope, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3936,7 +3961,7 @@ public Mono> uploadPagesFromURLNoCustomHeadersWithResponseAsync(S /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -4025,18 +4050,22 @@ public ResponseBase uploadPagesFromURL = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURLSync(this.client.getUrl(), containerName, blob, comp, pageWrite, sourceUrl, - sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + try { + return service.uploadPagesFromURLSync(this.client.getUrl(), containerName, blob, comp, pageWrite, sourceUrl, + sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, range, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, + ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -4098,7 +4127,7 @@ public void uploadPagesFromURL(String containerName, String blob, String sourceU /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL. - * + * * @param containerName The container name. * @param blob The blob name. * @param sourceUrl Specify a URL to the copy source. @@ -4187,13 +4216,17 @@ public Response uploadPagesFromURLNoCustomHeadersWithResponse(String conta = sourceIfModifiedSince == null ? null : new DateTimeRfc1123(sourceIfModifiedSince); DateTimeRfc1123 sourceIfUnmodifiedSinceConverted = sourceIfUnmodifiedSince == null ? null : new DateTimeRfc1123(sourceIfUnmodifiedSince); - return service.uploadPagesFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, pageWrite, - sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, contentLength, timeout, - range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, - this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + try { + return service.uploadPagesFromURLNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + pageWrite, sourceUrl, sourceRange, sourceContentMD5Converted, sourceContentcrc64Converted, + contentLength, timeout, range, encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, + leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sourceIfModifiedSinceConverted, sourceIfUnmodifiedSinceConverted, sourceIfMatch, sourceIfNoneMatch, + this.client.getVersion(), requestId, copySourceAuthorization, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -4528,7 +4561,7 @@ public Mono> getPageRangesNoCustomHeadersWithResponseAsync(St /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a * page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -4576,15 +4609,19 @@ public ResponseBase getPageRangesWithRe = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, range, - leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, marker, maxresults, accept, context); + try { + return service.getPageRangesSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, range, + leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + this.client.getVersion(), requestId, marker, maxresults, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a * page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -4624,14 +4661,19 @@ public ResponseBase getPageRangesWithRe public PageList getPageRanges(String containerName, String blob, String snapshot, Integer timeout, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { - return getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, Context.NONE).getValue(); + try { + return getPageRangesWithResponse(containerName, blob, snapshot, timeout, range, leaseId, ifModifiedSince, + ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, maxresults, Context.NONE) + .getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a * page blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -4679,9 +4721,13 @@ public Response getPageRangesNoCustomHeadersWithResponse(String contai = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, - timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, marker, maxresults, accept, context); + try { + return service.getPageRangesNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, + timeout, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, + ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -5070,7 +5116,7 @@ public Mono> getPageRangesDiffNoCustomHeadersWithResponseAsyn /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -5126,15 +5172,19 @@ public ResponseBase getPageRangesDi = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiffSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, - prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context); + try { + return service.getPageRangesDiffSync(this.client.getUrl(), containerName, blob, comp, snapshot, timeout, + prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, + ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, maxresults, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -5183,15 +5233,19 @@ public PageList getPageRangesDiff(String containerName, String blob, String snap String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, String marker, Integer maxresults) { - return getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, - range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, - maxresults, Context.NONE).getValue(); + try { + return getPageRangesDiffWithResponse(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, + range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, + maxresults, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * [Update] The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were * changed between target blob and previous snapshot or version. - * + * * @param containerName The container name. * @param blob The blob name. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob @@ -5247,10 +5301,14 @@ public Response getPageRangesDiffNoCustomHeadersWithResponse(String co = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getPageRangesDiffNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, - timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, - maxresults, accept, context); + try { + return service.getPageRangesDiffNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + snapshot, timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, marker, + maxresults, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -5597,7 +5655,7 @@ public Mono> resizeNoCustomHeadersWithResponseAsync(String contai /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size @@ -5654,15 +5712,19 @@ public ResponseBase resizeWithResponse(String cont = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.resizeSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), - requestId, accept, context); + try { + return service.resizeSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, encryptionKey, + encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size @@ -5696,7 +5758,7 @@ public void resize(String containerName, String blob, long blobContentLength, In /** * Resize the Blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The page blob size @@ -5753,10 +5815,14 @@ public Response resizeNoCustomHeadersWithResponse(String containerName, St = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.resizeNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), - requestId, accept, context); + try { + return service.resizeNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, + encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, ifModifiedSinceConverted, + ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, blobContentLength, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -6027,7 +6093,7 @@ public Mono> updateSequenceNumberNoCustomHeadersWithResponseAsync /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This @@ -6065,14 +6131,18 @@ public ResponseBase updateSequenceNu = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.updateSequenceNumberSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, sequenceNumberAction, - blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + try { + return service.updateSequenceNumberSync(this.client.getUrl(), containerName, blob, comp, timeout, leaseId, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This @@ -6107,7 +6177,7 @@ public void updateSequenceNumber(String containerName, String blob, SequenceNumb /** * Update the sequence number of the blob. - * + * * @param containerName The container name. * @param blob The blob name. * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. This @@ -6145,9 +6215,13 @@ public Response updateSequenceNumberNoCustomHeadersWithResponse(String con = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.updateSequenceNumberNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + try { + return service.updateSequenceNumberNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, + timeout, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, + sequenceNumberAction, blobSequenceNumber, this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -6415,7 +6489,7 @@ public Mono> copyIncrementalNoCustomHeadersWithResponseAsync(Stri * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -6450,9 +6524,13 @@ public ResponseBase copyIncrementalWithRe = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyIncrementalSync(this.client.getUrl(), containerName, blob, comp, timeout, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, - this.client.getVersion(), requestId, accept, context); + try { + return service.copyIncrementalSync(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -6460,7 +6538,7 @@ public ResponseBase copyIncrementalWithRe * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -6495,7 +6573,7 @@ public void copyIncremental(String containerName, String blob, String copySource * is copied such that only the differential changes between the previously copied snapshot are transferred to the * destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as * usual. This API is supported since REST version 2016-05-31. - * + * * @param containerName The container name. * @param blob The blob name. * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to 2 KB in @@ -6529,8 +6607,12 @@ public Response copyIncrementalNoCustomHeadersWithResponse(String containe = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); DateTimeRfc1123 ifUnmodifiedSinceConverted = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.copyIncrementalNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, - this.client.getVersion(), requestId, accept, context); + try { + return service.copyIncrementalNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, + ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java index 65fe84933f58a..f8e2a34907182 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java @@ -594,7 +594,7 @@ public Mono> setPropertiesNoCustomHeadersWithResponseAsync( /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -613,14 +613,18 @@ public ResponseBase setPropertiesWithRespons final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.setPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), - requestId, blobServiceProperties, accept, context); + try { + return service.setPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, blobServiceProperties, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -639,7 +643,7 @@ public void setProperties(BlobServiceProperties blobServiceProperties, Integer t /** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and * CORS (Cross-Origin Resource Sharing) rules. - * + * * @param blobServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -658,8 +662,12 @@ public Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProper final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.setPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, blobServiceProperties, accept, context); + try { + return service.setPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, blobServiceProperties, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -820,7 +828,7 @@ public Mono> getPropertiesNoCustomHeadersWithRes /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -839,14 +847,18 @@ public ResponseBase getProp final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.getPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), - requestId, accept, context); + try { + return service.getPropertiesSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -860,13 +872,17 @@ public ResponseBase getProp */ @ServiceMethod(returns = ReturnType.SINGLE) public BlobServiceProperties getProperties(Integer timeout, String requestId) { - return getPropertiesWithResponse(timeout, requestId, Context.NONE).getValue(); + try { + return getPropertiesWithResponse(timeout, requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS * (Cross-Origin Resource Sharing) rules. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -885,8 +901,12 @@ public Response getPropertiesNoCustomHeadersWithResponse( final String restype = "service"; final String comp = "properties"; final String accept = "application/xml"; - return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, accept, context); + try { + return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -1041,7 +1061,7 @@ public Mono> getStatisticsNoCustomHeadersWithRes /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -1059,14 +1079,18 @@ public ResponseBase getStat final String restype = "service"; final String comp = "stats"; final String accept = "application/xml"; - return service.getStatisticsSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), - requestId, accept, context); + try { + return service.getStatisticsSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), + requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -1079,13 +1103,17 @@ public ResponseBase getStat */ @ServiceMethod(returns = ReturnType.SINGLE) public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { - return getStatisticsWithResponse(timeout, requestId, Context.NONE).getValue(); + try { + return getStatisticsWithResponse(timeout, requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Retrieves statistics related to replication for the Blob service. It is only available on the secondary location * endpoint when read-access geo-redundant replication is enabled for the storage account. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -1103,8 +1131,12 @@ public Response getStatisticsNoCustomHeadersWithResponse( final String restype = "service"; final String comp = "stats"; final String accept = "application/xml"; - return service.getStatisticsNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, accept, context); + try { + return service.getStatisticsNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -1437,7 +1469,7 @@ public PagedFlux listBlobContainersSegmentNoCustomHeadersAsyn /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1476,13 +1508,17 @@ public PagedResponse listBlobContainersSegmentSinglePage(Stri = service.listBlobContainersSegmentSync(this.client.getUrl(), comp, prefix, marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1521,13 +1557,17 @@ public PagedResponse listBlobContainersSegmentSinglePage(Stri ResponseBase res = service.listBlobContainersSegmentSync(this.client.getUrl(), comp, prefix, marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1562,7 +1602,7 @@ public PagedIterable listBlobContainersSegment(String prefix, /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1599,7 +1639,7 @@ public PagedIterable listBlobContainersSegment(String prefix, /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1637,13 +1677,17 @@ public PagedResponse listBlobContainersSegmentNoCustomHeaders Response res = service.listBlobContainersSegmentNoCustomHeadersSync(this.client.getUrl(), comp, prefix, marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1682,13 +1726,17 @@ public PagedResponse listBlobContainersSegmentNoCustomHeaders Response res = service.listBlobContainersSegmentNoCustomHeadersSync(this.client.getUrl(), comp, prefix, marker, maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1724,7 +1772,7 @@ public PagedIterable listBlobContainersSegmentNoCustomHeaders /** * The List Containers Segment operation returns a list of the containers under the specified account. - * + * * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string value that identifies the portion of the list of containers to be returned with the next * listing operation. The operation returns the NextMarker value within the response body if the listing operation @@ -1918,7 +1966,7 @@ public Mono> getUserDelegationKeyNoCustomHeadersWith /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1937,14 +1985,18 @@ public Mono> getUserDelegationKeyNoCustomHeadersWith final String restype = "service"; final String comp = "userdelegationkey"; final String accept = "application/xml"; - return service.getUserDelegationKeySync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), - requestId, keyInfo, accept, context); + try { + return service.getUserDelegationKeySync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1958,13 +2010,17 @@ public Mono> getUserDelegationKeyNoCustomHeadersWith */ @ServiceMethod(returns = ReturnType.SINGLE) public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout, String requestId) { - return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, Context.NONE).getValue(); + try { + return getUserDelegationKeyWithResponse(keyInfo, timeout, requestId, Context.NONE).getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token * authentication. - * + * * @param keyInfo Key information. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting @@ -1983,8 +2039,12 @@ public Response getUserDelegationKeyNoCustomHeadersWithRespon final String restype = "service"; final String comp = "userdelegationkey"; final String accept = "application/xml"; - return service.getUserDelegationKeyNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, keyInfo, accept, context); + try { + return service.getUserDelegationKeyNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, + this.client.getVersion(), requestId, keyInfo, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2093,7 +2153,7 @@ public Mono> getAccountInfoNoCustomHeadersWithResponseAsync(Conte /** * Returns the sku name and account kind. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -2105,13 +2165,17 @@ public ResponseBase getAccountInfoWithRespo final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoSync(this.client.getUrl(), restype, comp, this.client.getVersion(), accept, - context); + try { + return service.getAccountInfoSync(this.client.getUrl(), restype, comp, this.client.getVersion(), accept, + context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Returns the sku name and account kind. - * + * * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -2122,7 +2186,7 @@ public void getAccountInfo() { /** * Returns the sku name and account kind. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. @@ -2134,8 +2198,12 @@ public Response getAccountInfoNoCustomHeadersWithResponse(Context context) final String restype = "account"; final String comp = "properties"; final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), restype, comp, this.client.getVersion(), - accept, context); + try { + return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), restype, comp, + this.client.getVersion(), accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2472,7 +2540,7 @@ public Mono submitBatchNoCustomHeadersWithResponseAsync(long con /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. * Example header value: multipart/mixed; boundary=batch_<GUID>. @@ -2493,13 +2561,17 @@ public ResponseBase submitBatchWithResp String multipartContentType, BinaryData body, Integer timeout, String requestId, Context context) { final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchSync(this.client.getUrl(), comp, contentLength, multipartContentType, timeout, - this.client.getVersion(), requestId, body, accept, context); + try { + return service.submitBatchSync(this.client.getUrl(), comp, contentLength, multipartContentType, timeout, + this.client.getVersion(), requestId, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. * Example header value: multipart/mixed; boundary=batch_<GUID>. @@ -2517,13 +2589,17 @@ public ResponseBase submitBatchWithResp @ServiceMethod(returns = ReturnType.SINGLE) public InputStream submitBatch(long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { - return submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, Context.NONE) - .getValue(); + try { + return submitBatchWithResponse(contentLength, multipartContentType, body, timeout, requestId, Context.NONE) + .getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * + * * @param contentLength The length of the request. * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch boundary. * Example header value: multipart/mixed; boundary=batch_<GUID>. @@ -2544,8 +2620,12 @@ public Response submitBatchNoCustomHeadersWithResponse(long content BinaryData body, Integer timeout, String requestId, Context context) { final String comp = "batch"; final String accept = "application/xml"; - return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), comp, contentLength, multipartContentType, - timeout, this.client.getVersion(), requestId, body, accept, context); + try { + return service.submitBatchNoCustomHeadersSync(this.client.getUrl(), comp, contentLength, + multipartContentType, timeout, this.client.getVersion(), requestId, body, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -2804,7 +2884,7 @@ public Mono> filterBlobsNoCustomHeadersWithResponseA * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -2839,15 +2919,19 @@ public ResponseBase filterBlobsWi : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.filterBlobsSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, where, - marker, maxresults, includeConverted, accept, context); + try { + return service.filterBlobsSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, + where, marker, maxresults, includeConverted, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -2873,14 +2957,19 @@ public ResponseBase filterBlobsWi @ServiceMethod(returns = ReturnType.SINGLE) public FilterBlobSegment filterBlobs(Integer timeout, String requestId, String where, String marker, Integer maxresults, List include) { - return filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, Context.NONE).getValue(); + try { + return filterBlobsWithResponse(timeout, requestId, where, marker, maxresults, include, Context.NONE) + .getValue(); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search * expression. Filter blobs searches across all containers within a storage account but can be scoped within the * expression to a single container. - * + * * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting * Timeouts for Blob Service Operations.</a>. @@ -2914,8 +3003,12 @@ public Response filterBlobsNoCustomHeadersWithResponse(Intege : include.stream() .map(paramItemValue -> Objects.toString(paramItemValue, "")) .collect(Collectors.joining(",")); - return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), - requestId, where, marker, maxresults, includeConverted, accept, context); + try { + return service.filterBlobsNoCustomHeadersSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), + requestId, where, marker, maxresults, includeConverted, accept, context); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** @@ -3022,9 +3115,9 @@ public Mono> listBlobContainersSegmentNextNoCus /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - * + * * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. @@ -3039,15 +3132,19 @@ public PagedResponse listBlobContainersSegmentNextSinglePage( ResponseBase res = service.listBlobContainersSegmentNextSync(nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - * + * * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. @@ -3064,15 +3161,19 @@ public PagedResponse listBlobContainersSegmentNextSinglePage( ResponseBase res = service.listBlobContainersSegmentNextSync(nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), res.getDeserializedHeaders()); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - * + * * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. @@ -3087,15 +3188,19 @@ public PagedResponse listBlobContainersSegmentNextNoCustomHea final String accept = "application/xml"; Response res = service.listBlobContainersSegmentNextNoCustomHeadersSync(nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - * + * * The nextLink parameter. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the * analytics logs when storage analytics logging is enabled. @@ -3111,7 +3216,11 @@ public PagedResponse listBlobContainersSegmentNextNoCustomHea final String accept = "application/xml"; Response res = service.listBlobContainersSegmentNextNoCustomHeadersSync(nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + try { + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().getBlobContainerItems(), res.getValue().getNextMarker(), null); + } catch (BlobStorageExceptionInternal internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } } From 06aa0dadf083b47d3de2aac446e2edfb19a8edde Mon Sep 17 00:00:00 2001 From: Rabab Date: Tue, 3 Sep 2024 17:22:23 -0700 Subject: [PATCH 39/45] using unreleased version of core to test whether tests pass now for query api --- sdk/storage/azure-storage-blob/pom.xml | 2 +- sdk/storage/azure-storage-file-datalake/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 1e89f040f855a..71e1974ed912e 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -70,7 +70,7 @@ com.azure azure-core - 1.51.0 + 1.52.0-beta.1 com.azure diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index a9c861a6a8949..7dbb73e793d54 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -66,7 +66,7 @@ com.azure azure-core - 1.51.0 + 1.52.0-beta.1 com.azure From 3380c2117c7af1f545ef6cb442d51f94ac2777ac Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 4 Sep 2024 10:58:40 -0700 Subject: [PATCH 40/45] updating okhttp version --- sdk/storage/azure-storage-blob/pom.xml | 2 +- sdk/storage/azure-storage-file-datalake/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index 71e1974ed912e..aa94f55735bbf 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -182,7 +182,7 @@ com.azure azure-core-http-okhttp - 1.12.2 + 1.13.0-beta.1 test diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 7dbb73e793d54..3a8e7dc754ab7 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -147,7 +147,7 @@ com.azure azure-core-http-okhttp - 1.12.2 + 1.13.0-beta.1 test From f7a52b9f166e3de1df4a3b287f33636a3485c5df Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 4 Sep 2024 13:41:50 -0700 Subject: [PATCH 41/45] updating version_client.txt to use unreleased version of blob and datalake --- eng/versioning/version_client.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 648d22b923e77..120efcdf857fa 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -490,6 +490,9 @@ unreleased_com.azure:azure-identity;1.14.0-beta.2 unreleased_com.azure:azure-core-amqp;2.10.0-beta.1 +unreleased_com.azure:azure-storage-blob;12.28.0-beta.2 +unreleased_com.azure:com.azure:azure-storage-file-datalake;12.21.0-beta.2 + # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid # for dependency versions. These entries are specifically for when we've released a beta for From c93d9b00011ac4989e2572fb1c9a9ea5d62fa6c4 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 4 Sep 2024 14:12:24 -0700 Subject: [PATCH 42/45] updating unreleased versions for core and okhttp --- eng/versioning/version_client.txt | 4 ++-- sdk/storage/azure-storage-blob/pom.xml | 4 ++-- sdk/storage/azure-storage-file-datalake/pom.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 120efcdf857fa..9f42011aad462 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -490,8 +490,8 @@ unreleased_com.azure:azure-identity;1.14.0-beta.2 unreleased_com.azure:azure-core-amqp;2.10.0-beta.1 -unreleased_com.azure:azure-storage-blob;12.28.0-beta.2 -unreleased_com.azure:com.azure:azure-storage-file-datalake;12.21.0-beta.2 +unreleased_com.azure:unreleased_com.azure:azure-core;1.52.0-beta.1 +unreleased_com.azure:unreleased_com.azure:azure-core-http-okhttp;1.13.0-beta.1 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/storage/azure-storage-blob/pom.xml b/sdk/storage/azure-storage-blob/pom.xml index aa94f55735bbf..de8794e58472c 100644 --- a/sdk/storage/azure-storage-blob/pom.xml +++ b/sdk/storage/azure-storage-blob/pom.xml @@ -70,7 +70,7 @@ com.azure azure-core - 1.52.0-beta.1 + 1.52.0-beta.1 com.azure @@ -182,7 +182,7 @@ com.azure azure-core-http-okhttp - 1.13.0-beta.1 + 1.13.0-beta.1 test diff --git a/sdk/storage/azure-storage-file-datalake/pom.xml b/sdk/storage/azure-storage-file-datalake/pom.xml index 3a8e7dc754ab7..3ae08a8e115a0 100644 --- a/sdk/storage/azure-storage-file-datalake/pom.xml +++ b/sdk/storage/azure-storage-file-datalake/pom.xml @@ -66,7 +66,7 @@ com.azure azure-core - 1.52.0-beta.1 + 1.52.0-beta.1 com.azure @@ -147,7 +147,7 @@ com.azure azure-core-http-okhttp - 1.13.0-beta.1 + 1.13.0-beta.1 test From 592c0799ea21c135784a26e1fa584482c9cd37ba Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 4 Sep 2024 14:51:09 -0700 Subject: [PATCH 43/45] fixing unreleased version --- eng/versioning/version_client.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 9f42011aad462..cb144c3e29956 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -490,8 +490,8 @@ unreleased_com.azure:azure-identity;1.14.0-beta.2 unreleased_com.azure:azure-core-amqp;2.10.0-beta.1 -unreleased_com.azure:unreleased_com.azure:azure-core;1.52.0-beta.1 -unreleased_com.azure:unreleased_com.azure:azure-core-http-okhttp;1.13.0-beta.1 +unreleased_com.azure:azure-core;1.52.0-beta.1 +unreleased_com.azure:azure-core-http-okhttp;1.13.0-beta.1 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid From d2c25004b1cd7a6b7f78f1455827d459c0818320 Mon Sep 17 00:00:00 2001 From: Rabab Date: Wed, 4 Sep 2024 15:27:52 -0700 Subject: [PATCH 44/45] removing dead method readFromInputStream --- .../blob/BlobContainerAsyncClient.java | 2 +- .../implementation/util/BlobQueryReader.java | 27 +------------------ .../blob/specialized/BlobClientBase.java | 4 +-- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index 2f0e7efc84a03..adb06e7e29214 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -985,7 +985,7 @@ Mono> setAccessPolicyWithResponse(PublicAccessType accessType, return this.azureBlobStorage.getContainers().setAccessPolicyNoCustomHeadersWithResponseAsync(containerName, null, requestConditions.getLeaseId(), accessType, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), null, identifiers, context); + requestConditions.getIfUnmodifiedSince(), null, finalIdentifiers, context); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java index 9d5321e059dc1..9259961b06f12 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobQueryReader.java @@ -3,7 +3,6 @@ package com.azure.storage.blob.implementation.util; -import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.implementation.models.ArrowConfiguration; import com.azure.storage.blob.implementation.models.ArrowField; @@ -20,7 +19,6 @@ import com.azure.storage.blob.models.BlobQueryParquetSerialization; import com.azure.storage.blob.models.BlobQueryProgress; import com.azure.storage.blob.models.BlobQuerySerialization; -import com.azure.storage.common.implementation.FluxInputStream; import com.azure.storage.internal.avro.implementation.AvroConstants; import com.azure.storage.internal.avro.implementation.AvroObject; import com.azure.storage.internal.avro.implementation.AvroReaderFactory; @@ -93,30 +91,7 @@ public Flux read() { * @return The parsed query reactive stream. * @throws IOException If an I/O error occurs. */ - public InputStream readInputStream(InputStream inputStream) { - // Convert InputStream to Flux - Flux avroFlux = FluxUtil.toFluxByteBuffer(inputStream); - - // Use existing read method to process the data - Flux processedData = new AvroReaderFactory().getAvroReader(avroFlux).read() - .map(AvroObject::getObject) - .concatMap(this::parseRecord); - - return new FluxInputStream(processedData); - } - - /** - * Avro parses a query reactive stream. - * - * The Avro stream is formatted as the Avro Header (that specifies the schema) and the Avro Body (that contains - * a series of blocks of data). The Query Avro schema indicates that the objects being emitted from the parser can - * either be a result data record, an end record, a progress record or an error record. - * - * @param inputStream The input stream to read from. - * @return The parsed query reactive stream. - * @throws IOException If an I/O error occurs. - */ - public InputStream readInputStream2(InputStream inputStream) throws IOException { + public InputStream readInputStream(InputStream inputStream) throws IOException { AvroReaderSyncFactory avroReaderSyncFactory = new AvroReaderSyncFactory(); ByteBuffer fullBuffer = convertInputStreamToByteBuffer(inputStream); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index cca61e01aeae8..4462a5c9b745d 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -2575,7 +2575,7 @@ public Response openQueryInputStreamWithResponse(BlobQueryOptions q BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); try { - InputStream resultStream = reader.readInputStream2(avroInputStream); + InputStream resultStream = reader.readInputStream(avroInputStream); return new SimpleResponse<>(response, resultStream); } catch (IOException e) { throw LOGGER.logExceptionAsError(new UncheckedIOException(e)); @@ -2680,7 +2680,7 @@ public BlobQueryResponse queryWithResponse(BlobQueryOptions queryOptions, Durati InputStream avroInputStream = response.getValue(); BlobQueryReader reader = new BlobQueryReader(null, queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()); - InputStream resultStream = reader.readInputStream2(avroInputStream); + InputStream resultStream = reader.readInputStream(avroInputStream); OutputStream outputStream = queryOptions.getOutputStream(); byte[] buffer = new byte[4096]; int bytesRead; From 9358ad07928c23ded3494daed97f7a62c15d8353 Mon Sep 17 00:00:00 2001 From: Rabab Date: Thu, 5 Sep 2024 13:02:06 -0700 Subject: [PATCH 45/45] adding checkstyle suppression for impl clients --- sdk/storage/azure-storage-blob/checkstyle-suppressions.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml index 3738a3dc073ca..d2e954d56ed63 100644 --- a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml +++ b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml @@ -39,4 +39,10 @@ + + + + + +